Author: adrianc
Date: Tue Jan 20 16:51:56 2015
New Revision: 1653296

URL: http://svn.apache.org/r1653296
Log:
Fixed a lookup bug caused by the recent widget refactoring, reported by lmac on 
the dev mailing list.

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

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=1653296&r1=1653295&r2=1653296&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Tue Jan 20 16:51:56 2015
@@ -1018,6 +1018,19 @@ under the License.
                         <xs:documentation>Deprecated - use the image 
element.</xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
+                <xs:attribute name="target-type" default="intra-app">
+                    <xs:annotation>
+                        <xs:documentation>Deprecated - use the url-mode 
attribute.</xs:documentation>
+                    </xs:annotation>
+                    <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:extension>
         </xs:complexContent>
     </xs:complexType>

Modified: 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java?rev=1653296&r1=1653295&r2=1653296&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java 
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java 
Tue Jan 20 16:51:56 2015
@@ -2102,12 +2102,15 @@ public class ModelFormField {
         private final FlexibleStringExpander description;
         private final boolean requestConfirmation;
         private final Link link;
+
         public HyperlinkField(Element element, ModelFormField modelFormField) {
             super(element, modelFormField);
             this.alsoHidden = 
!"false".equals(element.getAttribute("also-hidden"));
             this.confirmationMsgExdr = 
FlexibleStringExpander.getInstance(element.getAttribute("confirmation-message"));
             this.description = 
FlexibleStringExpander.getInstance(element.getAttribute("description"));
             this.requestConfirmation = 
"true".equals(element.getAttribute("request-confirmation"));
+            // Backwards-compatible fix
+            element.setAttribute("url-mode", 
element.getAttribute("target-type"));
             this.link = new Link(element);
         }
 


Reply via email to