svn commit: r1742194 - /ofbiz/branches/release15.12/framework/widget/src/org/ofbiz/widget/model/FormFactory.java

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

svn commit: r1742194 - /ofbiz/branches/release15.12/framework/widget/src/org/ofbiz/widget/model/FormFactory.java

jleroux@apache.org
Author: jleroux
Date: Tue May  3 20:38:48 2016
New Revision: 1742194

URL: http://svn.apache.org/viewvc?rev=1742194&view=rev
Log:
Reverts useless changes introduced with r1742128 + r1742143 for INVALID "Bug when getting to webtools/control/FindUtilCache" - https://issues.apache.org/jira/browse/OFBIZ-7033

Modified:
    ofbiz/branches/release15.12/framework/widget/src/org/ofbiz/widget/model/FormFactory.java

Modified: ofbiz/branches/release15.12/framework/widget/src/org/ofbiz/widget/model/FormFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/framework/widget/src/org/ofbiz/widget/model/FormFactory.java?rev=1742194&r1=1742193&r2=1742194&view=diff
==============================================================================
--- ofbiz/branches/release15.12/framework/widget/src/org/ofbiz/widget/model/FormFactory.java (original)
+++ ofbiz/branches/release15.12/framework/widget/src/org/ofbiz/widget/model/FormFactory.java Tue May  3 20:38:48 2016
@@ -119,18 +119,13 @@ public class FormFactory {
     }
 
     public static ModelForm createModelForm(Document formFileDoc, ModelReader entityModelReader, DispatchContext dispatchContext, String formLocation, String formName) {
-        Element rootElement = formFileDoc.getDocumentElement();
-        Element formElement = UtilXml.firstChildElement(rootElement, "form", "name", formName);
-        if (formElement == null) {
-            formElement = UtilXml.firstChildElement(rootElement, "grid", "name", formName);
-        }
+        Element formElement = UtilXml.firstChildElement(formFileDoc.getDocumentElement(), "form", "name", formName);
         return createModelForm(formElement, entityModelReader, dispatchContext, formLocation, formName);
     }
 
     public static ModelForm createModelForm(Element formElement, ModelReader entityModelReader, DispatchContext dispatchContext, String formLocation, String formName) {
         String formType = formElement.getAttribute("type");
-        if ((formType.isEmpty() || "single".equals(formType) || "upload".equals(formType))
-                && !formElement.getLocalName().equals("grid")) {
+        if (formType.isEmpty() || "single".equals(formType) || "upload".equals(formType)) {
             return new ModelSingleForm(formElement, formLocation, entityModelReader, dispatchContext);
         } else {
             return new ModelGrid(formElement, formLocation, entityModelReader, dispatchContext);