Author: jleroux
Date: Wed Dec 21 22:24:58 2011
New Revision: 1221913
URL:
http://svn.apache.org/viewvc?rev=1221913&view=revLog:
A patch from Leila Mekika "Use-when not working on multi-forms submit button"
https://issues.apache.org/jira/browse/OFBIZ-4605The 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