svn commit: r1001330 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java

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

svn commit: r1001330 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java

jonesde
Author: jonesde
Date: Sat Sep 25 22:44:13 2010
New Revision: 1001330

URL: http://svn.apache.org/viewvc?rev=1001330&view=rev
Log:
Removed very old functionality for form widget field actions entity-and and entity-condition that put their results automatically in the context with the field name from the form's list-name attribute, causing it to overwrite any existing list that might be in place for that; the effect was that you could not have any entity-and or entity-condition actions other than the one for the list or multi form's main list to iterate over; the proper way to do this for years now has been to specify which list you want, and this functionality was from the original approach where it was assumed for multi and list forms that you would only have one such query in the actions (which was an add-on to the original functionality that I never liked)

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

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=1001330&r1=1001329&r2=1001330&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java Sat Sep 25 22:44:13 2010
@@ -458,11 +458,17 @@ public abstract class ModelFormAction {
             try {
                 // don't want to do this: context.put("defaultFormResultList", null);
                 finder.runFind(context, WidgetWorker.getDelegator(context));
+                
+                /* NOTE DEJ20100925: this should not be running any more as it causes actions in a list or multi
+                 * form definition to overwrite the desired list elsewhere, this was the really old way of doing
+                 * it that was removed a long time ago and needs to stay gone to avoid issues; the form's list
+                 * should be found by explicitly matching the name:
                 Object obj = context.get(this.actualListName);
                 if (obj != null && ((obj instanceof List) || (obj instanceof EntityListIterator))) {
                     String modelFormListName = modelForm.getListName();
                     context.put(modelFormListName, obj);
                 }
+                 */
             } catch (GeneralException e) {
                 String errMsg = "Error doing entity query by condition: " + e.toString();
                 Debug.logError(e, errMsg, module);
@@ -502,11 +508,17 @@ public abstract class ModelFormAction {
             try {
                 // don't want to do this: context.put("defaultFormResultList", null);
                 finder.runFind(context, WidgetWorker.getDelegator(context));
+                
+                /* NOTE DEJ20100925: this should not be running any more as it causes actions in a list or multi
+                 * form definition to overwrite the desired list elsewhere, this was the really old way of doing
+                 * it that was removed a long time ago and needs to stay gone to avoid issues; the form's list
+                 * should be found by explicitly matching the name:
                 Object obj = context.get(this.actualListName);
                 if (obj != null && ((obj instanceof List) || (obj instanceof EntityListIterator))) {
                     String modelFormListName = modelForm.getListName();
                     context.put(modelFormListName, obj);
                 }
+                 */
             } catch (GeneralException e) {
                 String errMsg = "Error doing entity query by condition: " + e.toString();
                 Debug.logError(e, errMsg, module);
@@ -515,7 +527,3 @@ public abstract class ModelFormAction {
         }
     }
 }
-
-
-
-