(OFBIZ-8505)
Reverts r1765058 + r1765080 following discussion on dev ML
This was introduced for this improvement: In form widgets of list type empty
header row should not render if list to render in file is empty for OFBIZ-7598
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1766080 13f79535-47bb-0310-9956-ffa450edef68
If found this in console logs:
XmlFileLoader: File file:/home/ofbizDemo/trunk/framework/common/widget/CommonScreens.xml process error. Line: 491. Error message: cvc-complex-type.2.4.d: Invalid content was found starting with element 'xls'. No child element is expected at this point.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751055 13f79535-47bb-0310-9956-ffa450edef68
I have uploaded a patch for the simple methods schema.
In general, the top level attributes are converted to simpleType, and attributeGroups to complexType.
Changed the following attribute name
1. ‘field’ to ‘fieldType’
2. ‘level’ to ‘levelType'
Denormalize the following attributeGroups
1. attlist.compare
2. attlist.compare-field
Left attributeGroup ‘typeDefaultString’ unchanged, cos it doesn’t matter. Not in use, it seem.
jleroux: we also fixed an issue with
<xs:element name="field" type="fieldType"/>
to
<xs:element ref="field"/>
In the patch
And I found a small issue (not minilang related) in ExampleCompoundWidgets.xml
- <sm:log message="CompoundWidgetsFunc runs" sm:level="info"/>
+ <sm:log message="CompoundWidgetsFunc runs" level="info"/>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750647 13f79535-47bb-0310-9956-ffa450edef68
Reverts the simple method to use the original schema without namespace. "Duplicates" simple-methods.xsd in simple-methods-ns.xsd as we did, to get the simple-method namespace for compound-widgets.
For myself: when we will do the 3rd more elegant option (no schema duplication), have been changed also:
minilang-catalog.xml
compound-widgets.xsd
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749938 13f79535-47bb-0310-9956-ffa450edef68
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68
1. The following xsd are duplicated to use namespaces
site-conf.xsd -> site-conf-ns.xsd
widget-form.xsd -> widget-form-ns.xsd
widget-screen.xsd -> widget-screen-ns.xsd
widget-menu.xsd -> widget-menu-ns.xsd
simple-methods.xsd-> simple-methods-ns.xsd
For example, in site-conf-ns.xsd, we have the following document level attribute
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://ofbiz.apache.org/Site-Conf" targetNamespace="http://ofbiz.apache.org/Site-Conf">
instead of
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
2. The above schema are used into compound-widgets.xsd so that compound widgets use only one consolidated schema.
3. Update ExampleCompoundWidgets.xml to use the new compound-widgets.xsd. For example
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sc="http://ofbiz.apache.org/Site-Conf"
xmlns:sm="http://ofbiz.apache.org/Simple-Method"
xmlns:wf="http://ofbiz.apache.org/Widget-Form"
xmlns:wt="http://ofbiz.apache.org/Widget-Tree"
xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
<sc:site-conf>
<sc:request-map uri="CompoundWidgets1">
<sc:security https="true" auth="true"/>
<sc:event type="simple" invoke="CompoundWidgetsFunc" path="component://example/widget/example/ExampleCompoundWidgets.xml"/>
<sc:response name="success" type="view" value="CompoundWidgets1"/>
</sc:request-map>
<sc:request-map uri="CompoundWidgets2"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="CompoundWidgets2"/></sc:request-map>
<sc:view-map name="CompoundWidgets1" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/>
<sc:view-map name="CompoundWidgets2" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/>
</sc:site-conf>
...... the rest
4. Change java code to support reading xml with namespace (i.e. xml for compound widgets)
jleroux: I simply replaced tabs by spaces in Java files and removed this commented out line
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd">
in ExampleCompoundWidgets.xml
We decided to duplicate the simple-methods.xsd rather than updating all concerned files. Else we would have to update the attributes at document level for rest of the controllers, menus, forms, simple methods and screens. For example, in controller.xml, we would have to change
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd”
to
xmlns="http://ofbiz.apache.org/sc” xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”>
But especially we would have to use the same syntax with namespaces prefixes than in ExampleCompoundWidgets.xml (see example above). This can be discussed because with auto-completion it's not a big deal, but could be overwhelming for existing custom projects...
James mentionned that "the schema location at compound-widgets.xsd is relative to the project...". I don't see any problems with that. We can keep as is as long as we maintain the relation (ie if the main XSDs are moved). Moreover with the previous addition of compound-widgets.xsd in widget-catalog.xml it seems all things work correctly (eg w/o the new *-ns.xsd yet committed, the auto-completion works well in ExampleCompoundWidgets.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746302 13f79535-47bb-0310-9956-ffa450edef68
In addition, add an export example button on FindExample screen and add complete macro ftl renderer unit test. Issue OFBIZ-6931 proposed by Leila Mekika. Thanks to her, jacques and pierre for theirs remarks.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746045 13f79535-47bb-0310-9956-ffa450edef68
Actually this is due to both compound-widgets.xsd and ExampleCompoundWidgets.xml errors. Both have not visible effects but in logs
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1741022 13f79535-47bb-0310-9956-ffa450edef68
Fix a regression on <auto-parameters-entity/> and <auto-parameters-service/> in which default-entity-name and default-service-name weren't taken in consideration anymore.
Thanks Dhiraj Gupta for reporting the issue, Thanks Jacques and Divesh for the analysis
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740415 13f79535-47bb-0310-9956-ffa450edef68
Adrian: This adds the ability to include screen widgets, form widgets, menu widgets, and simple methods in a single XML file. This approach could be used in situations where the widgets share a logical grouping - so they can be kept in one place.
James: An example to test out Compound Screen Widget
jlerouxc: here are the changes and tests globally
# As James mentionned we no longer need *-v2.xsd files, I removed them from Adrian's patch
# I created a compound-widgets.xsd based on Adrian's and James Yong's previous work. From Paul Foxworthy's comment in OFBIZ-4090, I decided to name the root compound-widgets (hence the file name). I arranged its elements in another way, see below with ExampleCompoundWidgets.xml
# I slightly modified James Yong's ExampleCompoundScreenWidget.xml file and renamed it ExampleCompoundWidgets.xml. I added an "s" because there are several OFBiz widgets gathered in one place. For the modifications: I simply changed the names and arranged the elements in another way which I find better suited. I'm used to 1st create the query, then the menus, the screens and their forms. We rarely use widget-trees but it's there also. Finally the simple-method at end if any. The order is not enforced though, so everybody can use her/his own :)
# I added a French label
# I completed the widget-catalog.xml with this new entry and tested locally in Eclipse by reloading the XML catalog entries.
I hope I did not miss nor mixed things, the local instance I used is a bit overcrowded with pending changes...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738958 13f79535-47bb-0310-9956-ffa450edef68
With these elements, example component have a new FindExample search screen to select the display list type with a example of :
* include-form : list examples with their features
* include-screen : list examples with their items
* include-grid : list examples with their status history
The element include-menu is present on FindUtilCache screen. Also a new CommonInlineBarMenu menu type to display menu with specific purpose (in-line) is now present and with this logic adding in-line-bar css class on themes thomawak and flatgrey.
This patch is combinate Issues :
* OFBIZ-6502 Add support for form/grid embedding within grids
* OFBIZ-6501 Add support for screen embedding inside grids
* OFBIZ-6404 Allow form/grid widget hyperlinks to be grouped into a single column
sub-tasks of master issue OFBIZ-6314 Widget Refactoring - Placeholder issue
Thanks to Christian and Adrian for their time
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686116 13f79535-47bb-0310-9956-ffa450edef68
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685132 13f79535-47bb-0310-9956-ffa450edef68
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685124 13f79535-47bb-0310-9956-ffa450edef68
Introduces a new maxlength attribute to the textarea element in forms, applies the maxlength (255 chars) value in several FTL files, when the DB is limiting the length.
Thanks Forrest Rae for reporting the issue and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682132 13f79535-47bb-0310-9956-ffa450edef68
Adds a read-only attribute to the text input field. Using the display type is not enough, because it's uneasy to assign values through Javascript as using the lookup description-field-name shows OOTB. And the disabled option is not good when you want to still show the submitted values on return.
Also
* improves widget-form.xsd documentation about read-only attribute for lookup
* completes the foFormMacroLibrary.ftl where placeholder tabindex were missing (if this even ever makes sense)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680921 13f79535-47bb-0310-9956-ffa450edef68
Or on a form of type list or multi, it is not possible to completely ignore a field via use-when attribute. Instead it hides the title and the column header became shifted from the table content.
For example I want to hide the description column from my form when exampleName is choosen as sort-field.
This also modifies
example/widget/example/ExampleForms.xml#ListExamples
to illustrate this functionality
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680865 13f79535-47bb-0310-9956-ffa450edef68
Instead of adding a form-name attribute only in lookup sub-element, I added it a the field level and removed the one at the lookup level.So the form-name field attribute can be used in the field of both the lookup and if needed the field set in the lookup description-field-name attribute. I only tested it in a version more near 13.07 but I believe it's ok here
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1667774 13f79535-47bb-0310-9956-ffa450edef68
We neglected this aspect so far, adding a "form-name" attribute to the lookup element fixes it. You then need also to set the correct id-name value on field element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1665535 13f79535-47bb-0310-9956-ffa450edef68
1. Extract and reuse common code/artifacts.
2. Organized the class structure so it makes more sense.
3. Add an XML widget visitor - this restores and improves the widget classes toString() methods. This is a WIP.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1652638 13f79535-47bb-0310-9956-ffa450edef68
Scenario:
1. Go to Content webapp
2. Go to CompDoc menuitem
3. Search
4. Go to 'Tree' view
5. We can not use 'Up' and 'Down' function
When menu with linktype="hidden-form" was render for each menu, they has the same name for form element, so it cause error.
My solution is add extra attribute(extra-index) for Menu, and then in menu definition we provide this attribute and the forms with different name will be rendered.
My implement was tested in this bug for Content webapp
jleroux: I have simply amended the up and down labels to have them more legible. I'd have preferred to not have all uppercased, but ran out of time for such a trivial change
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576891 13f79535-47bb-0310-9956-ffa450edef68
Then with https://issues.apache.org/jira/browse/OFBIZ-3128 contains became the default
But this was working only when defining a text-field. When auto-fields-entity (and I guess auto-fields-service, not tested) was used then like/begins-with was still the default.
This commit changes that and makes things consistent: contains is now always used and set as default everywhere (no longer need to specify the text-field when using auto-fields-* to have contains as default)
Note: I'm not quite sure why like/begins-with was still used as default, since it was no longer the default in widget-form.xsd, but anyway making contains default there works. Also in ModelFormField.java to have things consistent
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576276 13f79535-47bb-0310-9956-ffa450edef68
jquery-1.8.2 to jquery-1.10.2 which implies using jquery-migrate-1.2.1 for plugins compatiblities
jquery-ui-timepicker-addon-1.0.5 to jquery-ui-timepicker-addon-1.4.3 (using min now, better i18n)
jquery-ui-1.9.0 to jquery-ui-1.10.3
removes jquery.ui.datepicker.js now integrated in jquery.ui
jquery.hotkeys-0.7.9 to jquery.hotkeys-0.8
jquery.maskedinput-1.2.2 to jquery.maskedinput-1.3.1
jquery.validate 1.10.0 to 1.11.1
I never realised how much efforts have been put in this plugin!
I fixed an issue in JsLanguageFilesMapping generation
I removed the messages_ptbr.js and messages_ptpt.js files and the related conundrum in JsLanguageFileMappingCreator.java
untested, found not use cases OOTB
jquery.jcarousel ?(2006) to 0.3.0 (2013)
untested, found not use cases OOTB
jquery.flot 0.7 to 0.8.2 (lot of changes, still works)
removes useless flotpie.ftl
removes empty flotr folder
jquery.mobile-1.1.0-rc.1 to jquery.mobile-1.4.0
untested, found not use cases OOTB
jquery.cookie to jquery.cookie-1.4.0
Removes all useless/redundant js files (not only jQuery unused old versions)
notably removes all under images/jquery/ui/development-bundle/ui
removes now useless GooglemapMarkers.js and GooglemapSimple.js
Flat Grey application.js
moves jQuery(document).ready(function() at bottom (spotted in Chrome console)
css
I did not find much issues, I spotted the title bar of the lookups, but got it fixed after some efforts.
Issues:
Imagemanagement: I got issues while testing, actually I'm not quite qure how it works, even in stable demo. It should be validated again. I commit nevertheless my changes:
moves js part from product to images component
removes useless calls to js files (mostly in imagemanagement, but not only)
renames jquery.min.js to sizzle.min.js.
Inside sizzle.min.js, updates the Dojo part to v1.10.17-pre and removes the jQuery part
changes to use ofbizContentUrl macro for generating js calls
jquery.rotate.js NOT! It's jQueryRotateCompressed.js http://markmail.org/message/dit3dlh3ph4jnenp
Got ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'D:\projectsASF\ofbizClean\framework\images\webapp\images\pro&' to length 100. I opened OFBIZ-5501 for that
I tried to update jstree to jstree 3 but gave up. I let the jquery.jstree-3.0.0-beta3 files in place in case someone would give it a chance...
Not related but while a it:
removes <!--flot example requests--> from birt controller (moved recently to example component)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559769 13f79535-47bb-0310-9956-ffa450edef68