svn commit: r906584 - in /ofbiz/trunk/framework: example/widget/example/FormWidgetExampleForms.xml widget/dtd/widget-form.xsd widget/src/org/ofbiz/widget/form/ModelFormField.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r906584 - in /ofbiz/trunk/framework: example/widget/example/FormWidgetExampleForms.xml widget/dtd/widget-form.xsd widget/src/org/ofbiz/widget/form/ModelFormField.java

jleroux@apache.org
Author: jleroux
Date: Thu Feb  4 18:02:38 2010
New Revision: 906584

URL: http://svn.apache.org/viewvc?rev=906584&view=rev
Log:
The syntax of the new attributes introduced by the layer lookup were verbose.
We know we are in a lookup element and no attributes interfere. So I reduced the verbosity by removing the "lookup-" part everywhere it was possible (ie everywhere)
So we go from
    lookup-presentation
    lookup-height
    lookup-width
    lookup-position
to
    presentation
    height
    width
    position
in the lookup element

Modified:
    ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml
    ofbiz/trunk/framework/widget/dtd/widget-form.xsd
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java

Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml?rev=906584&r1=906583&r2=906584&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml Thu Feb  4 18:02:38 2010
@@ -282,8 +282,8 @@
 
     <!-- Lookup Layer Example -->
     <form name="ExampleLookupFields" type="single" title="">
-        <field name="partyIdFrom" position="1" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonFrom}"><lookup target-form-name="LookupPartyNameExamplePopup" description-field-name="LookupPartyNameExamplePopup" lookup-presentation="layer" lookup-position="normal"/></field>
-        <field name="partyIdTo" position="2" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonTo}"><lookup target-form-name="LookupPartyNameExamplePopupByName" lookup-presentation="layer" lookup-position="center" lookup-height="580px" lookup-width="450px"/></field>
+        <field name="partyIdFrom" position="1" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonFrom}"><lookup target-form-name="LookupPartyNameExamplePopup" description-field-name="LookupPartyNameExamplePopup" presentation="layer" position="normal"/></field>
+        <field name="partyIdTo" position="2" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonTo}"><lookup target-form-name="LookupPartyNameExamplePopupByName" presentation="layer" position="center" height="580px" width="450px"/></field>
     </form>
 
     <form name="SelectionBoxesExampleForm" type="single">

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=906584&r1=906583&r2=906584&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Thu Feb  4 18:02:38 2010
@@ -903,7 +903,7 @@
                 </xs:restriction>
             </xs:simpleType>
         </xs:attribute>
-        <xs:attribute name="lookup-presentation" default="window">
+        <xs:attribute name="presentation" default="window">
             <xs:annotation><xs:documentation>Shows the lookup as moveable and resizable layer or window. For layer lookups use the 'LookupLayerPopupDecorator'</xs:documentation></xs:annotation>
             <xs:simpleType>
                 <xs:restriction base="xs:string">
@@ -912,13 +912,13 @@
                 </xs:restriction>
             </xs:simpleType>
         </xs:attribute>
-        <xs:attribute type="xs:string" name="lookup-height">
+        <xs:attribute type="xs:string" name="height">
             <xs:annotation><xs:documentation>Only layer height. I.e. 250px, 12%</xs:documentation></xs:annotation>
         </xs:attribute>
-        <xs:attribute type="xs:string" name="lookup-width">
+        <xs:attribute type="xs:string" name="width">
             <xs:annotation><xs:documentation>Only layer width. I.e. 250px, 12%</xs:documentation></xs:annotation>
         </xs:attribute>
-        <xs:attribute name="lookup-position" default="normal">
+        <xs:attribute name="position" default="normal">
             <xs:annotation><xs:documentation>Only layer position. Normal sets the layer under the target field.</xs:documentation></xs:annotation>
             <xs:simpleType>
                 <xs:restriction base="xs:string">

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=906584&r1=906583&r2=906584&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Thu Feb  4 18:02:38 2010
@@ -3472,10 +3472,10 @@
             this.formName = FlexibleStringExpander.getInstance(element.getAttribute("target-form-name"));
             this.descriptionFieldName = element.getAttribute("description-field-name");
             this.targetParameter = element.getAttribute("target-parameter");
-            this.lookupPresentation = element.getAttribute("lookup-presentation");
-            this.lookupHeight = element.getAttribute("lookup-height");
-            this.lookupWidth = element.getAttribute("lookup-width");
-            this.lookupPosition = element.getAttribute("lookup-position");
+            this.lookupPresentation = element.getAttribute("presentation");
+            this.lookupHeight = element.getAttribute("height");
+            this.lookupWidth = element.getAttribute("width");
+            this.lookupPosition = element.getAttribute("position");
 
             Element subHyperlinkElement = UtilXml.firstChildElement(element, "sub-hyperlink");
             if (subHyperlinkElement != null) {