svn commit: r1221913 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java

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

svn commit: r1221913 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java

jleroux@apache.org
Author: jleroux
Date: Wed Dec 21 22:24:58 2011
New Revision: 1221913

URL: http://svn.apache.org/viewvc?rev=1221913&view=rev
Log:
A patch from Leila Mekika "Use-when not working on multi-forms submit button" https://issues.apache.org/jira/browse/OFBIZ-4605

The submit button of a form multi is rendered even if we add a use-when condition

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1221913&r1=1221912&r2=1221913&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Wed Dec 21 22:24:58 2011
@@ -1424,7 +1424,7 @@ public class MacroFormRenderer implement
         Iterator<ModelFormField> submitFields = modelForm.getMultiSubmitFields().iterator();
         while (submitFields.hasNext()) {
             ModelFormField submitField = submitFields.next();
-            if (submitField != null) {
+            if (submitField != null && submitField.shouldUse(context)) {
 
                 // Threw this in that as a hack to keep the submit button from expanding the first field
                 // Needs a more rugged solution