From 941d9ec1fe96a037afd56631b1a983c8fe7c92bc Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Tue, 31 May 2016 16:48:09 +0000 Subject: [PATCH] A slightly modified patch from James Yong for "Autocompletion for Compound Widget" https://issues.apache.org/jira/browse/OFBIZ-7061 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 instead of 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 ...... 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 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/specialpurpose@1746302 13f79535-47bb-0310-9956-ffa450edef68 --- .../widget/example/ExampleCompoundWidgets.xml | 188 +++++++++--------- 1 file changed, 97 insertions(+), 91 deletions(-) diff --git a/example/widget/example/ExampleCompoundWidgets.xml b/example/widget/example/ExampleCompoundWidgets.xml index 6a2acefa9..6d501c3a3 100644 --- a/example/widget/example/ExampleCompoundWidgets.xml +++ b/example/widget/example/ExampleCompoundWidgets.xml @@ -19,97 +19,103 @@ under the License. --> - + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Demo For Compound Screen Widget + + + + + + + + - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
- - - - - -
-
-
-
-
-
- - -
- - - - - - - - - - -
- - - - - -
-
-
-
-
-
-
- - -
- -
- -
- -
-
- - - - - - - + + + + + + + + + + + + + + + + Demo For Compound Screen Widget + + + + + + + + +
+ + + + + + + + + + + + + + + +