Author: lektran
Date: Sat Jul 4 12:14:30 2009
New Revision: 791110
URL:
http://svn.apache.org/viewvc?rev=791110&view=revLog:
Allow disabling of a pagination on-event-update-area element by overriding with a blank target, part of OFBIZ-2661
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=791110&r1=791109&r2=791110&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Sat Jul 4 12:14:30 2009
@@ -649,7 +649,12 @@
}
int index = onPaginateUpdateAreas.indexOf(updateArea);
if (index != -1) {
- onPaginateUpdateAreas.set(index, updateArea);
+ if (UtilValidate.isNotEmpty(updateArea.areaTarget)) {
+ onPaginateUpdateAreas.set(index, updateArea);
+ } else {
+ // blank target indicates a removing override
+ onPaginateUpdateAreas.remove(index);
+ }
} else {
onPaginateUpdateAreas.add(updateArea);
}