You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2015/01/17 17:47:24 UTC

svn commit: r1652638 [1/6] - in /ofbiz/trunk/framework/widget: dtd/ src/org/ofbiz/widget/ src/org/ofbiz/widget/artifact/ src/org/ofbiz/widget/fo/ src/org/ofbiz/widget/form/ src/org/ofbiz/widget/html/ src/org/ofbiz/widget/menu/ src/org/ofbiz/widget/scre...

Author: adrianc
Date: Sat Jan 17 16:47:23 2015
New Revision: 1652638

URL: http://svn.apache.org/r1652638
Log:
Screen widget overhaul:

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.


Added:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/AbstractModelAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/AbstractModelCondition.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/CommonWidgetModels.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelCondition.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelConditionFactory.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelConditionVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/AbstractWidgetVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetActionVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetConditionVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetFieldVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetVisitor.java
Removed:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java
Modified:
    ofbiz/trunk/framework/widget/dtd/widget-common.xsd
    ofbiz/trunk/framework/widget/dtd/widget-form.xsd
    ofbiz/trunk/framework/widget/dtd/widget-menu.xsd
    ofbiz/trunk/framework/widget/dtd/widget-screen.xsd
    ofbiz/trunk/framework/widget/dtd/widget-tree.xsd
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelActionVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelFieldVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetVisitor.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/artifact/ArtifactInfoGatherer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FieldInfo.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MacroMenuRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuStringRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenStringRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/TextScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java

Modified: ofbiz/trunk/framework/widget/dtd/widget-common.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-common.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-common.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-common.xsd Sat Jan 17 16:47:23 2015
@@ -516,4 +516,154 @@ under the License.
             <xs:attribute type="xs:string" name="value" />
         </xs:complexType>
     </xs:element>
+    <xs:element name="parameter">
+        <xs:complexType>
+            <xs:attribute type="xs:string" name="param-name" use="required" />
+            <xs:attribute type="xs:string" name="from-field" />
+            <xs:attribute type="xs:string" name="value" />
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="auto-parameters-service">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
+            </xs:sequence>
+            <xs:attribute name="service-name" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
+            <xs:attribute name="send-if-empty" default="true">
+                <xs:simpleType>
+                    <xs:restriction base="xs:token">
+                        <xs:enumeration value="true" />
+                        <xs:enumeration value="false" />
+                    </xs:restriction>
+                </xs:simpleType>
+            </xs:attribute>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="auto-parameters-entity">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
+            </xs:sequence>
+            <xs:attribute name="entity-name" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
+            <xs:attribute name="include" default="pk">
+                <xs:simpleType>
+                    <xs:restriction base="xs:token">
+                        <xs:enumeration value="pk" />
+                        <xs:enumeration value="nonpk" />
+                        <xs:enumeration value="all" />
+                    </xs:restriction>
+                </xs:simpleType>
+            </xs:attribute>
+            <xs:attribute name="send-if-empty" default="true">
+                <xs:simpleType>
+                    <xs:restriction base="xs:token">
+                        <xs:enumeration value="true" />
+                        <xs:enumeration value="false" />
+                    </xs:restriction>
+                </xs:simpleType>
+            </xs:attribute>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="exclude">
+        <xs:complexType>
+            <xs:attribute name="field-name" type="xs:string" use="required" />
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="link">
+        <xs:sequence>
+            <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
+            <xs:element minOccurs="0" name="image" type="image" />
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="text" />
+        <xs:attribute type="xs:string" name="id" />
+        <xs:attribute type="xs:string" name="style" />
+        <xs:attribute type="xs:string" name="name" />
+        <xs:attribute type="xs:string" name="title" />
+        <xs:attribute type="xs:nonNegativeInteger" name="size" /><!-- Text size limit -->
+        <xs:attribute type="xs:string" name="target" />
+        <xs:attribute type="xs:string" name="target-window" />
+        <xs:attribute type="xs:string" name="prefix" />
+        <xs:attribute type="xs:string" name="width" />
+        <xs:attribute type="xs:string" name="height" />
+        <xs:attribute name="link-type" default="auto">
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="auto">
+                        <xs:annotation>
+                            <xs:documentation>
+                                If selected the hidden-form type will be used if the url-mode is intra-app
+                                and the request specified has an event, otherwise the anchor type will be used,
+                                except if the ajax-window mode is specified.
+                            </xs:documentation>
+                        </xs:annotation>
+                    </xs:enumeration>
+                    <xs:enumeration value="anchor" />
+                    <xs:enumeration value="hidden-form" />
+                        <!-- FIXME: This is not a link type. It indicates the target window should be a popup dialog. -->
+                    <xs:enumeration value="ajax-window" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="url-mode" default="intra-app">
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="intra-app" />
+                    <xs:enumeration value="inter-app" />
+                    <xs:enumeration value="content" />
+                    <xs:enumeration value="plain" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="full-path" default="false">
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="true" />
+                    <xs:enumeration value="false" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="secure" default="false">
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="true" />
+                    <xs:enumeration value="false" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="encode" default="false">
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="true" />
+                    <xs:enumeration value="false" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="image" mixed="true">
+        <xs:attribute type="xs:string" name="src" />
+        <xs:attribute type="xs:string" name="id" />
+        <xs:attribute type="xs:string" name="style" />
+        <xs:attribute type="xs:string" name="width" />
+        <xs:attribute type="xs:string" name="height" />
+        <xs:attribute type="xs:string" name="border" />
+        <xs:attribute type="xs:string" name="alt" />
+        <xs:attribute type="xs:string" name="title" />
+        <xs:attribute name="url-mode" default="content">
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="ofbiz" />
+                    <xs:enumeration value="content" />
+                    <xs:enumeration value="raw" />
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+    </xs:complexType>
 </xs:schema>

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Sat Jan 17 16:47:23 2015
@@ -967,158 +967,61 @@ under the License.
             <xs:attribute type="xs:string" name="value" />
         </xs:complexType>
     </xs:element>
-    <xs:element name="hyperlink" substitutionGroup="AllFields">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="auto-parameters-service"/>
-                <xs:element minOccurs="0" ref="auto-parameters-entity"/>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
-            </xs:sequence>
-            <xs:attribute name="also-hidden" default="true">
-                <xs:annotation>
-                    <xs:documentation>If set to true, an hidden form field is also rendered, with the name of the field and its content.</xs:documentation>
-                </xs:annotation>
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="link-type" default="auto">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="auto">
-                            <xs:annotation>
-                                <xs:documentation>If selected the hidden-form type will be used if the url-mode is intra-app and the request specified has an event, otherwise the anchor type will be used.</xs:documentation>
-                            </xs:annotation>
-                        </xs:enumeration>
-                        <xs:enumeration value="anchor" />
-                        <xs:enumeration value="hidden-form" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="target-type" default="intra-app">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="intra-app" />
-                        <xs:enumeration value="inter-app" />
-                        <xs:enumeration value="content" />
-                        <xs:enumeration value="plain" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute type="xs:string" name="target" use="required">
-                <xs:annotation>
-                    <xs:documentation>The target location of the hyperlink; can use the ${} syntax to substitute values from the context.</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute type="xs:string" name="description">
-                <xs:annotation>
-                    <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute type="xs:string" name="target-window" />
-            <xs:attribute type="xs:string" name="alternate">
-                <xs:annotation>
-                    <xs:documentation>Alternate text if the image is not found at image-location</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute type="xs:string" name="image-title">
-                <xs:annotation>
-                    <xs:documentation>Use as a title for the HTML img tag</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute type="xs:string" name="image-location" />
-            <xs:attribute name="request-confirmation" default="false">
-                <xs:annotation>
-                    <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default</xs:documentation>
-                </xs:annotation>
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="confirmation-message" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>The message displayed in confirmation box</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="parameters-map" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>A Map in the context that will be used as additional name/value pairs.</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute type="xs:integer" name="size">
-                <xs:annotation>
-                    <xs:documentation>Specifies the size of the field (as a number of characters), when the text to display exceed the given size it is truncated and add the complete text as a hint</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="parameter">
-        <xs:complexType>
-            <xs:attribute type="xs:string" name="param-name" use="required" />
-            <xs:attribute type="xs:string" name="from-field" />
-            <xs:attribute type="xs:string" name="value" />
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="auto-parameters-service">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
-            </xs:sequence>
-            <xs:attribute name="service-name" type="xs:string">
-                 <xs:annotation>
-                     <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation>
-                 </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="send-if-empty" default="true">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true"/>
-                        <xs:enumeration value="false"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="auto-parameters-entity">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
-            </xs:sequence>
-            <xs:attribute name="entity-name" type="xs:string">
-                 <xs:annotation>
-                     <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation>
-                 </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="include" default="pk">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="pk"/>
-                        <xs:enumeration value="nonpk"/>
-                        <xs:enumeration value="all"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="send-if-empty" default="true">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true"/>
-                        <xs:enumeration value="false"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="exclude">
-        <xs:complexType>
-            <xs:attribute name="field-name" type="xs:string" use="required"/>
-        </xs:complexType>
-    </xs:element>
+    <xs:complexType name="hyperlink">
+        <xs:complexContent>
+            <xs:extension base="link">
+                <xs:attribute type="xs:string" name="description">
+                    <xs:annotation>
+                        <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+                <xs:attribute name="request-confirmation" default="false">
+                    <xs:annotation>
+                        <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default</xs:documentation>
+                    </xs:annotation>
+                    <xs:simpleType>
+                        <xs:restriction base="xs:token">
+                            <xs:enumeration value="true" />
+                            <xs:enumeration value="false" />
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+                <xs:attribute name="confirmation-message" type="xs:string">
+                    <xs:annotation>
+                        <xs:documentation>The message displayed in confirmation box</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+                <xs:attribute name="also-hidden" default="true">
+                    <xs:annotation>
+                        <xs:documentation>If set to true, an hidden form field is also rendered, with the name of the field and its content.</xs:documentation>
+                    </xs:annotation>
+                    <xs:simpleType>
+                        <xs:restriction base="xs:token">
+                            <xs:enumeration value="true" />
+                            <xs:enumeration value="false" />
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+                <!-- These attributes have been replaced by the image element -->
+                <xs:attribute type="xs:string" name="alternate">
+                    <xs:annotation>
+                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+                <xs:attribute type="xs:string" name="image-title">
+                    <xs:annotation>
+                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+                <xs:attribute type="xs:string" name="image-location">
+                    <xs:annotation>
+                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:element name="hyperlink" type="hyperlink" substitutionGroup="AllFields"/>
     <xs:element name="ignored" substitutionGroup="AllFields">
         <xs:complexType/>
     </xs:element>
@@ -1760,43 +1663,19 @@ under the License.
             <xs:attribute name="cols" type="xs:positiveInteger" default="40" />
         </xs:complexType>
     </xs:element>
-    <xs:element name="sub-hyperlink">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="auto-parameters-service"/>
-                <xs:element minOccurs="0" ref="auto-parameters-entity"/>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
-            </xs:sequence>
+    <xs:complexType name="sub-hyperlink">
+        <xs:complexContent>
+            <xs:extension base="link">
+                <xs:attribute type="xs:string" name="description">
+                    <xs:annotation>
+                        <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
             <xs:attribute type="xs:string" name="use-when" />
-            <xs:attribute type="xs:string" name="link-style" />
-            <xs:attribute name="link-type" default="auto">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="auto">
-                            <xs:annotation>
-                                <xs:documentation>If selected the hidden-form type will be used if the url-mode is intra-app and the request specified has an event, otherwise the anchor type will be used.</xs:documentation>
-                            </xs:annotation>
-                        </xs:enumeration>
-                        <xs:enumeration value="anchor" />
-                        <xs:enumeration value="hidden-form" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="target-type" default="intra-app">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="intra-app" />
-                        <xs:enumeration value="inter-app" />
-                        <xs:enumeration value="content" />
-                        <xs:enumeration value="plain" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute type="xs:string" name="target" use="required" />
-            <xs:attribute type="xs:string" name="description" />
-            <xs:attribute type="xs:string" name="target-window" />
-        </xs:complexType>
-    </xs:element>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:element name="sub-hyperlink" type="sub-hyperlink"/>
 
   <!-- ================== ACTIONS ==================== -->
     <xs:element name="actions">

Modified: ofbiz/trunk/framework/widget/dtd/widget-menu.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-menu.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-menu.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-menu.xsd Sat Jan 17 16:47:23 2015
@@ -158,167 +158,7 @@ under the License.
             </xs:attribute>
         </xs:complexType>
     </xs:element>
-    <xs:element name="image">
-        <xs:complexType mixed="true">
-            <xs:attribute type="xs:string" name="src" />
-            <xs:attribute type="xs:string" name="id" />
-            <xs:attribute type="xs:string" name="style" />
-            <xs:attribute type="xs:string" name="width" />
-            <xs:attribute type="xs:string" name="height" />
-            <xs:attribute type="xs:string" name="border" />
-            <xs:attribute name="url-mode" default="content">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="ofbiz" />
-                        <xs:enumeration value="content" />
-                        <xs:enumeration value="raw" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="link">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="auto-parameters-service"/>
-                <xs:element minOccurs="0" ref="auto-parameters-entity"/>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
-                <xs:element minOccurs="0" ref="image" />
-            </xs:sequence>
-            <xs:attribute type="xs:string" name="text" />
-            <xs:attribute type="xs:string" name="id" />
-            <xs:attribute type="xs:string" name="style" />
-            <xs:attribute type="xs:string" name="name" />
-            <xs:attribute type="xs:string" name="target" />
-            <xs:attribute type="xs:string" name="target-window" />
-            <xs:attribute type="xs:string" name="prefix" />
-            <xs:attribute name="link-type" default="auto">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="auto">
-                            <xs:annotation>
-                                <xs:documentation>If selected the hidden-form type will be used if the url-mode is intra-app and the request specified has an event, otherwise the anchor type will be used.</xs:documentation>
-                            </xs:annotation>
-                        </xs:enumeration>
-                        <xs:enumeration value="anchor" />
-                        <xs:enumeration value="hidden-form" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="url-mode" default="intra-app">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="intra-app" />
-                        <xs:enumeration value="inter-app" />
-                        <xs:enumeration value="content" />
-                        <xs:enumeration value="plain" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="full-path" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="secure" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="encode" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="request-confirmation" default="false">
-                <xs:annotation>
-                    <xs:documentation>If true then the user is presented with a dialog box requesting confirmation prior to proceeding</xs:documentation>
-                </xs:annotation>
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="confirmation-message" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>The message displayed when request-confirm is set to true</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="parameters-map" type="xs:string" />
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="parameter">
-        <xs:complexType>
-            <xs:attribute type="xs:string" name="param-name" use="required" />
-            <xs:attribute type="xs:string" name="from-field" />
-            <xs:attribute type="xs:string" name="value" />
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="auto-parameters-service">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
-            </xs:sequence>
-            <xs:attribute name="service-name" type="xs:string" use="required">
-                 <xs:annotation>
-                     <xs:documentation>The service name used to resolve parameters. Flexible string allowed.</xs:documentation>
-                 </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="send-if-empty" default="true">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true"/>
-                        <xs:enumeration value="false"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="auto-parameters-entity">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
-            </xs:sequence>
-            <xs:attribute name="entity-name" type="xs:string">
-                 <xs:annotation>
-                     <xs:documentation>The entity name used to resolve parameters. If empty try use menu defaultEntityName attribute. Flexible string allowed.</xs:documentation>
-                 </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="include" default="pk">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="pk"/>
-                        <xs:enumeration value="nonpk"/>
-                        <xs:enumeration value="all"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="send-if-empty" default="true">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true"/>
-                        <xs:enumeration value="false"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="exclude">
-        <xs:complexType>
-            <xs:attribute name="field-name" type="xs:string" use="required"/>
-        </xs:complexType>
-    </xs:element>
+    <xs:element name="link" type="link"/>
 
     <xs:element name="actions">
         <xs:complexType>

Modified: ofbiz/trunk/framework/widget/dtd/widget-screen.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-screen.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-screen.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-screen.xsd Sat Jan 17 16:47:23 2015
@@ -304,139 +304,8 @@ under the License.
             <xs:attribute type="xs:string" name="style" />
         </xs:complexType>
     </xs:element>
-    <xs:element name="link" substitutionGroup="AllWidgets">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" ref="auto-parameters-service" />
-                <xs:element minOccurs="0" ref="auto-parameters-entity" />
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
-                <xs:element minOccurs="0" ref="image" />
-            </xs:sequence>
-            <xs:attribute type="xs:string" name="text" />
-            <xs:attribute type="xs:string" name="id" />
-            <xs:attribute type="xs:string" name="style" />
-            <xs:attribute type="xs:string" name="target" />
-            <xs:attribute type="xs:string" name="name" />
-            <xs:attribute type="xs:string" name="target-window" />
-            <xs:attribute type="xs:string" name="prefix" />
-            <xs:attribute type="xs:string" name="width" />
-            <xs:attribute type="xs:string" name="height" />
-            <xs:attribute name="link-type" default="auto">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="auto">
-                            <xs:annotation>
-                                <xs:documentation>
-                                    If selected the hidden-form type will be used if the url-mode is intra-app
-                                    and the request specified has an event, otherwise the anchor type will be used,
-                                    except if the ajax-window mode is specified.
-                                </xs:documentation>
-                            </xs:annotation>
-                        </xs:enumeration>
-                        <xs:enumeration value="anchor" />
-                        <xs:enumeration value="hidden-form" />
-                        <!-- FIXME: This is not a link type. It indicates the target window should be a popup dialog. -->
-                        <xs:enumeration value="ajax-window" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="url-mode" default="intra-app">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="intra-app" />
-                        <xs:enumeration value="inter-app" />
-                        <xs:enumeration value="content" />
-                        <xs:enumeration value="plain" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="full-path" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="secure" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="encode" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="parameter">
-        <xs:complexType>
-            <xs:attribute type="xs:string" name="param-name" use="required" />
-            <xs:attribute type="xs:string" name="from-field" />
-            <xs:attribute type="xs:string" name="value" />
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="auto-parameters-service">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
-            </xs:sequence>
-            <xs:attribute name="service-name" type="xs:string" use="required">
-                <xs:annotation>
-                    <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="send-if-empty" default="true">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="auto-parameters-entity">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
-            </xs:sequence>
-            <xs:attribute name="entity-name" type="xs:string" use="required">
-                <xs:annotation>
-                    <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-            <xs:attribute name="include" default="pk">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="pk" />
-                        <xs:enumeration value="nonpk" />
-                        <xs:enumeration value="all" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="send-if-empty" default="true">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="exclude">
-        <xs:complexType>
-            <xs:attribute name="field-name" type="xs:string" use="required" />
-        </xs:complexType>
-    </xs:element> 
+    <xs:element name="link" type="link" substitutionGroup="AllWidgets"/>
+
     <xs:element name="screenlet" substitutionGroup="AllWidgets">
         <xs:complexType>
             <xs:sequence>

Modified: ofbiz/trunk/framework/widget/dtd/widget-tree.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-tree.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-tree.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-tree.xsd Sat Jan 17 16:47:23 2015
@@ -127,82 +127,7 @@ under the License.
             <xs:attribute type="xs:string" name="style" />
         </xs:complexType>
     </xs:element>
-    <xs:element name="link">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
-                <xs:element minOccurs="0" ref="image" />
-            </xs:sequence>
-            <xs:attribute type="xs:string" name="text" />
-            <xs:attribute type="xs:string" name="id" />
-            <xs:attribute type="xs:string" name="style" />
-            <xs:attribute type="xs:string" name="name" />
-            <xs:attribute type="xs:string" name="title" />
-            <xs:attribute type="xs:string" name="target" />
-            <xs:attribute type="xs:string" name="target-window" />
-            <xs:attribute type="xs:string" name="prefix" />
-            <xs:attribute name="url-mode" default="intra-app">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="intra-app" />
-                        <xs:enumeration value="inter-app" />
-                        <xs:enumeration value="content" />
-                        <xs:enumeration value="plain" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="full-path" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="secure" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="encode" default="false">
-                <xs:simpleType>
-                    <xs:restriction base="xs:token">
-                        <xs:enumeration value="true" />
-                        <xs:enumeration value="false" />
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="parameter">
-        <xs:complexType>
-            <xs:attribute type="xs:string" name="param-name" use="required" />
-            <xs:attribute type="xs:string" name="from-field" />
-            <xs:attribute type="xs:string" name="value" />
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="image">
-        <xs:complexType mixed="true">
-        <xs:attribute type="xs:string" name="src"/>
-        <xs:attribute type="xs:string" name="id"/>
-        <xs:attribute type="xs:string" name="style"/>
-        <xs:attribute type="xs:string" name="width"/>
-        <xs:attribute type="xs:string" name="height"/>
-        <xs:attribute type="xs:string" name="border"/>
-        <xs:attribute name="url-mode" default="content">
-            <xs:simpleType>
-                <xs:restriction base="xs:token">
-                    <xs:enumeration value="ofbiz"/>
-                    <xs:enumeration value="content"/>
-                    <xs:enumeration value="raw"/>
-                </xs:restriction>
-            </xs:simpleType>
-        </xs:attribute>
-        </xs:complexType>
-    </xs:element>
+    <xs:element name="link" type="link"/>
     <xs:element name="actions">
         <xs:complexType>
             <xs:sequence>



Re: svn commit: r1652638 [1/6] - in /ofbiz/trunk/framework/widget: dtd/ src/org/ofbiz/widget/ src/org/ofbiz/widget/artifact/ src/org/ofbiz/widget/fo/ src/org/ofbiz/widget/form/ src/org/ofbiz/widget/html/ src/org/ofbiz/widget/menu/ src/org/ofbiz/widget/scre...

Posted by Adrian Crum <ad...@sandglass-software.com>.
Oops, I broke the menu widget. Working on a fix...

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 1/17/2015 8:47 AM, adrianc@apache.org wrote:
> Author: adrianc
> Date: Sat Jan 17 16:47:23 2015
> New Revision: 1652638
>
> URL: http://svn.apache.org/r1652638
> Log:
> Screen widget overhaul:
>
> 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.
>
>
> Added:
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/AbstractModelAction.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/AbstractModelCondition.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/CommonWidgetModels.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelAction.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelCondition.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelConditionFactory.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelConditionVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/AbstractWidgetVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetActionVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetConditionVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetFieldVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlWidgetVisitor.java
> Removed:
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java
> Modified:
>      ofbiz/trunk/framework/widget/dtd/widget-common.xsd
>      ofbiz/trunk/framework/widget/dtd/widget-form.xsd
>      ofbiz/trunk/framework/widget/dtd/widget-menu.xsd
>      ofbiz/trunk/framework/widget/dtd/widget-screen.xsd
>      ofbiz/trunk/framework/widget/dtd/widget-tree.xsd
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelActionVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelFieldVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidgetVisitor.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/artifact/ArtifactInfoGatherer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FieldInfo.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MacroMenuRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuStringRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenStringRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/TextScreenRenderer.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java
>
> Modified: ofbiz/trunk/framework/widget/dtd/widget-common.xsd
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-common.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/widget/dtd/widget-common.xsd (original)
> +++ ofbiz/trunk/framework/widget/dtd/widget-common.xsd Sat Jan 17 16:47:23 2015
> @@ -516,4 +516,154 @@ under the License.
>               <xs:attribute type="xs:string" name="value" />
>           </xs:complexType>
>       </xs:element>
> +    <xs:element name="parameter">
> +        <xs:complexType>
> +            <xs:attribute type="xs:string" name="param-name" use="required" />
> +            <xs:attribute type="xs:string" name="from-field" />
> +            <xs:attribute type="xs:string" name="value" />
> +        </xs:complexType>
> +    </xs:element>
> +    <xs:element name="auto-parameters-service">
> +        <xs:complexType>
> +            <xs:sequence>
> +                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
> +            </xs:sequence>
> +            <xs:attribute name="service-name" type="xs:string">
> +                <xs:annotation>
> +                    <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation>
> +                </xs:annotation>
> +            </xs:attribute>
> +            <xs:attribute name="send-if-empty" default="true">
> +                <xs:simpleType>
> +                    <xs:restriction base="xs:token">
> +                        <xs:enumeration value="true" />
> +                        <xs:enumeration value="false" />
> +                    </xs:restriction>
> +                </xs:simpleType>
> +            </xs:attribute>
> +        </xs:complexType>
> +    </xs:element>
> +    <xs:element name="auto-parameters-entity">
> +        <xs:complexType>
> +            <xs:sequence>
> +                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
> +            </xs:sequence>
> +            <xs:attribute name="entity-name" type="xs:string">
> +                <xs:annotation>
> +                    <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation>
> +                </xs:annotation>
> +            </xs:attribute>
> +            <xs:attribute name="include" default="pk">
> +                <xs:simpleType>
> +                    <xs:restriction base="xs:token">
> +                        <xs:enumeration value="pk" />
> +                        <xs:enumeration value="nonpk" />
> +                        <xs:enumeration value="all" />
> +                    </xs:restriction>
> +                </xs:simpleType>
> +            </xs:attribute>
> +            <xs:attribute name="send-if-empty" default="true">
> +                <xs:simpleType>
> +                    <xs:restriction base="xs:token">
> +                        <xs:enumeration value="true" />
> +                        <xs:enumeration value="false" />
> +                    </xs:restriction>
> +                </xs:simpleType>
> +            </xs:attribute>
> +        </xs:complexType>
> +    </xs:element>
> +    <xs:element name="exclude">
> +        <xs:complexType>
> +            <xs:attribute name="field-name" type="xs:string" use="required" />
> +        </xs:complexType>
> +    </xs:element>
> +    <xs:complexType name="link">
> +        <xs:sequence>
> +            <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
> +            <xs:element minOccurs="0" name="image" type="image" />
> +        </xs:sequence>
> +        <xs:attribute type="xs:string" name="text" />
> +        <xs:attribute type="xs:string" name="id" />
> +        <xs:attribute type="xs:string" name="style" />
> +        <xs:attribute type="xs:string" name="name" />
> +        <xs:attribute type="xs:string" name="title" />
> +        <xs:attribute type="xs:nonNegativeInteger" name="size" /><!-- Text size limit -->
> +        <xs:attribute type="xs:string" name="target" />
> +        <xs:attribute type="xs:string" name="target-window" />
> +        <xs:attribute type="xs:string" name="prefix" />
> +        <xs:attribute type="xs:string" name="width" />
> +        <xs:attribute type="xs:string" name="height" />
> +        <xs:attribute name="link-type" default="auto">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="auto">
> +                        <xs:annotation>
> +                            <xs:documentation>
> +                                If selected the hidden-form type will be used if the url-mode is intra-app
> +                                and the request specified has an event, otherwise the anchor type will be used,
> +                                except if the ajax-window mode is specified.
> +                            </xs:documentation>
> +                        </xs:annotation>
> +                    </xs:enumeration>
> +                    <xs:enumeration value="anchor" />
> +                    <xs:enumeration value="hidden-form" />
> +                        <!-- FIXME: This is not a link type. It indicates the target window should be a popup dialog. -->
> +                    <xs:enumeration value="ajax-window" />
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
> +        <xs:attribute name="url-mode" default="intra-app">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="intra-app" />
> +                    <xs:enumeration value="inter-app" />
> +                    <xs:enumeration value="content" />
> +                    <xs:enumeration value="plain" />
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
> +        <xs:attribute name="full-path" default="false">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="true" />
> +                    <xs:enumeration value="false" />
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
> +        <xs:attribute name="secure" default="false">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="true" />
> +                    <xs:enumeration value="false" />
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
> +        <xs:attribute name="encode" default="false">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="true" />
> +                    <xs:enumeration value="false" />
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
> +    </xs:complexType>
> +    <xs:complexType name="image" mixed="true">
> +        <xs:attribute type="xs:string" name="src" />
> +        <xs:attribute type="xs:string" name="id" />
> +        <xs:attribute type="xs:string" name="style" />
> +        <xs:attribute type="xs:string" name="width" />
> +        <xs:attribute type="xs:string" name="height" />
> +        <xs:attribute type="xs:string" name="border" />
> +        <xs:attribute type="xs:string" name="alt" />
> +        <xs:attribute type="xs:string" name="title" />
> +        <xs:attribute name="url-mode" default="content">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="ofbiz" />
> +                    <xs:enumeration value="content" />
> +                    <xs:enumeration value="raw" />
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
> +    </xs:complexType>
>   </xs:schema>
>
> Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
> +++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Sat Jan 17 16:47:23 2015
> @@ -967,158 +967,61 @@ under the License.
>               <xs:attribute type="xs:string" name="value" />
>           </xs:complexType>
>       </xs:element>
> -    <xs:element name="hyperlink" substitutionGroup="AllFields">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" ref="auto-parameters-service"/>
> -                <xs:element minOccurs="0" ref="auto-parameters-entity"/>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
> -            </xs:sequence>
> -            <xs:attribute name="also-hidden" default="true">
> -                <xs:annotation>
> -                    <xs:documentation>If set to true, an hidden form field is also rendered, with the name of the field and its content.</xs:documentation>
> -                </xs:annotation>
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="link-type" default="auto">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="auto">
> -                            <xs:annotation>
> -                                <xs:documentation>If selected the hidden-form type will be used if the url-mode is intra-app and the request specified has an event, otherwise the anchor type will be used.</xs:documentation>
> -                            </xs:annotation>
> -                        </xs:enumeration>
> -                        <xs:enumeration value="anchor" />
> -                        <xs:enumeration value="hidden-form" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="target-type" default="intra-app">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="intra-app" />
> -                        <xs:enumeration value="inter-app" />
> -                        <xs:enumeration value="content" />
> -                        <xs:enumeration value="plain" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute type="xs:string" name="target" use="required">
> -                <xs:annotation>
> -                    <xs:documentation>The target location of the hyperlink; can use the ${} syntax to substitute values from the context.</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute type="xs:string" name="description">
> -                <xs:annotation>
> -                    <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute type="xs:string" name="target-window" />
> -            <xs:attribute type="xs:string" name="alternate">
> -                <xs:annotation>
> -                    <xs:documentation>Alternate text if the image is not found at image-location</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute type="xs:string" name="image-title">
> -                <xs:annotation>
> -                    <xs:documentation>Use as a title for the HTML img tag</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute type="xs:string" name="image-location" />
> -            <xs:attribute name="request-confirmation" default="false">
> -                <xs:annotation>
> -                    <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default</xs:documentation>
> -                </xs:annotation>
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="confirmation-message" type="xs:string">
> -                <xs:annotation>
> -                    <xs:documentation>The message displayed in confirmation box</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="parameters-map" type="xs:string">
> -                <xs:annotation>
> -                    <xs:documentation>A Map in the context that will be used as additional name/value pairs.</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute type="xs:integer" name="size">
> -                <xs:annotation>
> -                    <xs:documentation>Specifies the size of the field (as a number of characters), when the text to display exceed the given size it is truncated and add the complete text as a hint</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="parameter">
> -        <xs:complexType>
> -            <xs:attribute type="xs:string" name="param-name" use="required" />
> -            <xs:attribute type="xs:string" name="from-field" />
> -            <xs:attribute type="xs:string" name="value" />
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="auto-parameters-service">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
> -            </xs:sequence>
> -            <xs:attribute name="service-name" type="xs:string">
> -                 <xs:annotation>
> -                     <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation>
> -                 </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="send-if-empty" default="true">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true"/>
> -                        <xs:enumeration value="false"/>
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="auto-parameters-entity">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
> -            </xs:sequence>
> -            <xs:attribute name="entity-name" type="xs:string">
> -                 <xs:annotation>
> -                     <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation>
> -                 </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="include" default="pk">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="pk"/>
> -                        <xs:enumeration value="nonpk"/>
> -                        <xs:enumeration value="all"/>
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="send-if-empty" default="true">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true"/>
> -                        <xs:enumeration value="false"/>
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="exclude">
> -        <xs:complexType>
> -            <xs:attribute name="field-name" type="xs:string" use="required"/>
> -        </xs:complexType>
> -    </xs:element>
> +    <xs:complexType name="hyperlink">
> +        <xs:complexContent>
> +            <xs:extension base="link">
> +                <xs:attribute type="xs:string" name="description">
> +                    <xs:annotation>
> +                        <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
> +                    </xs:annotation>
> +                </xs:attribute>
> +                <xs:attribute name="request-confirmation" default="false">
> +                    <xs:annotation>
> +                        <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default</xs:documentation>
> +                    </xs:annotation>
> +                    <xs:simpleType>
> +                        <xs:restriction base="xs:token">
> +                            <xs:enumeration value="true" />
> +                            <xs:enumeration value="false" />
> +                        </xs:restriction>
> +                    </xs:simpleType>
> +                </xs:attribute>
> +                <xs:attribute name="confirmation-message" type="xs:string">
> +                    <xs:annotation>
> +                        <xs:documentation>The message displayed in confirmation box</xs:documentation>
> +                    </xs:annotation>
> +                </xs:attribute>
> +                <xs:attribute name="also-hidden" default="true">
> +                    <xs:annotation>
> +                        <xs:documentation>If set to true, an hidden form field is also rendered, with the name of the field and its content.</xs:documentation>
> +                    </xs:annotation>
> +                    <xs:simpleType>
> +                        <xs:restriction base="xs:token">
> +                            <xs:enumeration value="true" />
> +                            <xs:enumeration value="false" />
> +                        </xs:restriction>
> +                    </xs:simpleType>
> +                </xs:attribute>
> +                <!-- These attributes have been replaced by the image element -->
> +                <xs:attribute type="xs:string" name="alternate">
> +                    <xs:annotation>
> +                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
> +                    </xs:annotation>
> +                </xs:attribute>
> +                <xs:attribute type="xs:string" name="image-title">
> +                    <xs:annotation>
> +                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
> +                    </xs:annotation>
> +                </xs:attribute>
> +                <xs:attribute type="xs:string" name="image-location">
> +                    <xs:annotation>
> +                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
> +                    </xs:annotation>
> +                </xs:attribute>
> +            </xs:extension>
> +        </xs:complexContent>
> +    </xs:complexType>
> +    <xs:element name="hyperlink" type="hyperlink" substitutionGroup="AllFields"/>
>       <xs:element name="ignored" substitutionGroup="AllFields">
>           <xs:complexType/>
>       </xs:element>
> @@ -1760,43 +1663,19 @@ under the License.
>               <xs:attribute name="cols" type="xs:positiveInteger" default="40" />
>           </xs:complexType>
>       </xs:element>
> -    <xs:element name="sub-hyperlink">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" ref="auto-parameters-service"/>
> -                <xs:element minOccurs="0" ref="auto-parameters-entity"/>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
> -            </xs:sequence>
> +    <xs:complexType name="sub-hyperlink">
> +        <xs:complexContent>
> +            <xs:extension base="link">
> +                <xs:attribute type="xs:string" name="description">
> +                    <xs:annotation>
> +                        <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
> +                    </xs:annotation>
> +                </xs:attribute>
>               <xs:attribute type="xs:string" name="use-when" />
> -            <xs:attribute type="xs:string" name="link-style" />
> -            <xs:attribute name="link-type" default="auto">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="auto">
> -                            <xs:annotation>
> -                                <xs:documentation>If selected the hidden-form type will be used if the url-mode is intra-app and the request specified has an event, otherwise the anchor type will be used.</xs:documentation>
> -                            </xs:annotation>
> -                        </xs:enumeration>
> -                        <xs:enumeration value="anchor" />
> -                        <xs:enumeration value="hidden-form" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="target-type" default="intra-app">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="intra-app" />
> -                        <xs:enumeration value="inter-app" />
> -                        <xs:enumeration value="content" />
> -                        <xs:enumeration value="plain" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute type="xs:string" name="target" use="required" />
> -            <xs:attribute type="xs:string" name="description" />
> -            <xs:attribute type="xs:string" name="target-window" />
> -        </xs:complexType>
> -    </xs:element>
> +            </xs:extension>
> +        </xs:complexContent>
> +    </xs:complexType>
> +    <xs:element name="sub-hyperlink" type="sub-hyperlink"/>
>
>     <!-- ================== ACTIONS ==================== -->
>       <xs:element name="actions">
>
> Modified: ofbiz/trunk/framework/widget/dtd/widget-menu.xsd
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-menu.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/widget/dtd/widget-menu.xsd (original)
> +++ ofbiz/trunk/framework/widget/dtd/widget-menu.xsd Sat Jan 17 16:47:23 2015
> @@ -158,167 +158,7 @@ under the License.
>               </xs:attribute>
>           </xs:complexType>
>       </xs:element>
> -    <xs:element name="image">
> -        <xs:complexType mixed="true">
> -            <xs:attribute type="xs:string" name="src" />
> -            <xs:attribute type="xs:string" name="id" />
> -            <xs:attribute type="xs:string" name="style" />
> -            <xs:attribute type="xs:string" name="width" />
> -            <xs:attribute type="xs:string" name="height" />
> -            <xs:attribute type="xs:string" name="border" />
> -            <xs:attribute name="url-mode" default="content">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="ofbiz" />
> -                        <xs:enumeration value="content" />
> -                        <xs:enumeration value="raw" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="link">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" ref="auto-parameters-service"/>
> -                <xs:element minOccurs="0" ref="auto-parameters-entity"/>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
> -                <xs:element minOccurs="0" ref="image" />
> -            </xs:sequence>
> -            <xs:attribute type="xs:string" name="text" />
> -            <xs:attribute type="xs:string" name="id" />
> -            <xs:attribute type="xs:string" name="style" />
> -            <xs:attribute type="xs:string" name="name" />
> -            <xs:attribute type="xs:string" name="target" />
> -            <xs:attribute type="xs:string" name="target-window" />
> -            <xs:attribute type="xs:string" name="prefix" />
> -            <xs:attribute name="link-type" default="auto">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="auto">
> -                            <xs:annotation>
> -                                <xs:documentation>If selected the hidden-form type will be used if the url-mode is intra-app and the request specified has an event, otherwise the anchor type will be used.</xs:documentation>
> -                            </xs:annotation>
> -                        </xs:enumeration>
> -                        <xs:enumeration value="anchor" />
> -                        <xs:enumeration value="hidden-form" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="url-mode" default="intra-app">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="intra-app" />
> -                        <xs:enumeration value="inter-app" />
> -                        <xs:enumeration value="content" />
> -                        <xs:enumeration value="plain" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="full-path" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="secure" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="encode" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="request-confirmation" default="false">
> -                <xs:annotation>
> -                    <xs:documentation>If true then the user is presented with a dialog box requesting confirmation prior to proceeding</xs:documentation>
> -                </xs:annotation>
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="confirmation-message" type="xs:string">
> -                <xs:annotation>
> -                    <xs:documentation>The message displayed when request-confirm is set to true</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="parameters-map" type="xs:string" />
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="parameter">
> -        <xs:complexType>
> -            <xs:attribute type="xs:string" name="param-name" use="required" />
> -            <xs:attribute type="xs:string" name="from-field" />
> -            <xs:attribute type="xs:string" name="value" />
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="auto-parameters-service">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
> -            </xs:sequence>
> -            <xs:attribute name="service-name" type="xs:string" use="required">
> -                 <xs:annotation>
> -                     <xs:documentation>The service name used to resolve parameters. Flexible string allowed.</xs:documentation>
> -                 </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="send-if-empty" default="true">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true"/>
> -                        <xs:enumeration value="false"/>
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="auto-parameters-entity">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude"/>
> -            </xs:sequence>
> -            <xs:attribute name="entity-name" type="xs:string">
> -                 <xs:annotation>
> -                     <xs:documentation>The entity name used to resolve parameters. If empty try use menu defaultEntityName attribute. Flexible string allowed.</xs:documentation>
> -                 </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="include" default="pk">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="pk"/>
> -                        <xs:enumeration value="nonpk"/>
> -                        <xs:enumeration value="all"/>
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="send-if-empty" default="true">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true"/>
> -                        <xs:enumeration value="false"/>
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="exclude">
> -        <xs:complexType>
> -            <xs:attribute name="field-name" type="xs:string" use="required"/>
> -        </xs:complexType>
> -    </xs:element>
> +    <xs:element name="link" type="link"/>
>
>       <xs:element name="actions">
>           <xs:complexType>
>
> Modified: ofbiz/trunk/framework/widget/dtd/widget-screen.xsd
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-screen.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/widget/dtd/widget-screen.xsd (original)
> +++ ofbiz/trunk/framework/widget/dtd/widget-screen.xsd Sat Jan 17 16:47:23 2015
> @@ -304,139 +304,8 @@ under the License.
>               <xs:attribute type="xs:string" name="style" />
>           </xs:complexType>
>       </xs:element>
> -    <xs:element name="link" substitutionGroup="AllWidgets">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" ref="auto-parameters-service" />
> -                <xs:element minOccurs="0" ref="auto-parameters-entity" />
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
> -                <xs:element minOccurs="0" ref="image" />
> -            </xs:sequence>
> -            <xs:attribute type="xs:string" name="text" />
> -            <xs:attribute type="xs:string" name="id" />
> -            <xs:attribute type="xs:string" name="style" />
> -            <xs:attribute type="xs:string" name="target" />
> -            <xs:attribute type="xs:string" name="name" />
> -            <xs:attribute type="xs:string" name="target-window" />
> -            <xs:attribute type="xs:string" name="prefix" />
> -            <xs:attribute type="xs:string" name="width" />
> -            <xs:attribute type="xs:string" name="height" />
> -            <xs:attribute name="link-type" default="auto">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="auto">
> -                            <xs:annotation>
> -                                <xs:documentation>
> -                                    If selected the hidden-form type will be used if the url-mode is intra-app
> -                                    and the request specified has an event, otherwise the anchor type will be used,
> -                                    except if the ajax-window mode is specified.
> -                                </xs:documentation>
> -                            </xs:annotation>
> -                        </xs:enumeration>
> -                        <xs:enumeration value="anchor" />
> -                        <xs:enumeration value="hidden-form" />
> -                        <!-- FIXME: This is not a link type. It indicates the target window should be a popup dialog. -->
> -                        <xs:enumeration value="ajax-window" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="url-mode" default="intra-app">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="intra-app" />
> -                        <xs:enumeration value="inter-app" />
> -                        <xs:enumeration value="content" />
> -                        <xs:enumeration value="plain" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="full-path" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="secure" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="encode" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="parameter">
> -        <xs:complexType>
> -            <xs:attribute type="xs:string" name="param-name" use="required" />
> -            <xs:attribute type="xs:string" name="from-field" />
> -            <xs:attribute type="xs:string" name="value" />
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="auto-parameters-service">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
> -            </xs:sequence>
> -            <xs:attribute name="service-name" type="xs:string" use="required">
> -                <xs:annotation>
> -                    <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="send-if-empty" default="true">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="auto-parameters-entity">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
> -            </xs:sequence>
> -            <xs:attribute name="entity-name" type="xs:string" use="required">
> -                <xs:annotation>
> -                    <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation>
> -                </xs:annotation>
> -            </xs:attribute>
> -            <xs:attribute name="include" default="pk">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="pk" />
> -                        <xs:enumeration value="nonpk" />
> -                        <xs:enumeration value="all" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="send-if-empty" default="true">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="exclude">
> -        <xs:complexType>
> -            <xs:attribute name="field-name" type="xs:string" use="required" />
> -        </xs:complexType>
> -    </xs:element>
> +    <xs:element name="link" type="link" substitutionGroup="AllWidgets"/>
> +
>       <xs:element name="screenlet" substitutionGroup="AllWidgets">
>           <xs:complexType>
>               <xs:sequence>
>
> Modified: ofbiz/trunk/framework/widget/dtd/widget-tree.xsd
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-tree.xsd?rev=1652638&r1=1652637&r2=1652638&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/widget/dtd/widget-tree.xsd (original)
> +++ ofbiz/trunk/framework/widget/dtd/widget-tree.xsd Sat Jan 17 16:47:23 2015
> @@ -127,82 +127,7 @@ under the License.
>               <xs:attribute type="xs:string" name="style" />
>           </xs:complexType>
>       </xs:element>
> -    <xs:element name="link">
> -        <xs:complexType>
> -            <xs:sequence>
> -                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
> -                <xs:element minOccurs="0" ref="image" />
> -            </xs:sequence>
> -            <xs:attribute type="xs:string" name="text" />
> -            <xs:attribute type="xs:string" name="id" />
> -            <xs:attribute type="xs:string" name="style" />
> -            <xs:attribute type="xs:string" name="name" />
> -            <xs:attribute type="xs:string" name="title" />
> -            <xs:attribute type="xs:string" name="target" />
> -            <xs:attribute type="xs:string" name="target-window" />
> -            <xs:attribute type="xs:string" name="prefix" />
> -            <xs:attribute name="url-mode" default="intra-app">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="intra-app" />
> -                        <xs:enumeration value="inter-app" />
> -                        <xs:enumeration value="content" />
> -                        <xs:enumeration value="plain" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="full-path" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="secure" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -            <xs:attribute name="encode" default="false">
> -                <xs:simpleType>
> -                    <xs:restriction base="xs:token">
> -                        <xs:enumeration value="true" />
> -                        <xs:enumeration value="false" />
> -                    </xs:restriction>
> -                </xs:simpleType>
> -            </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="parameter">
> -        <xs:complexType>
> -            <xs:attribute type="xs:string" name="param-name" use="required" />
> -            <xs:attribute type="xs:string" name="from-field" />
> -            <xs:attribute type="xs:string" name="value" />
> -        </xs:complexType>
> -    </xs:element>
> -    <xs:element name="image">
> -        <xs:complexType mixed="true">
> -        <xs:attribute type="xs:string" name="src"/>
> -        <xs:attribute type="xs:string" name="id"/>
> -        <xs:attribute type="xs:string" name="style"/>
> -        <xs:attribute type="xs:string" name="width"/>
> -        <xs:attribute type="xs:string" name="height"/>
> -        <xs:attribute type="xs:string" name="border"/>
> -        <xs:attribute name="url-mode" default="content">
> -            <xs:simpleType>
> -                <xs:restriction base="xs:token">
> -                    <xs:enumeration value="ofbiz"/>
> -                    <xs:enumeration value="content"/>
> -                    <xs:enumeration value="raw"/>
> -                </xs:restriction>
> -            </xs:simpleType>
> -        </xs:attribute>
> -        </xs:complexType>
> -    </xs:element>
> +    <xs:element name="link" type="link"/>
>       <xs:element name="actions">
>           <xs:complexType>
>               <xs:sequence>
>
>