You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/10/19 15:42:48 UTC

svn commit: r586449 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java

Author: jacopoc
Date: Fri Oct 19 06:42:47 2007
New Revision: 586449

URL: http://svn.apache.org/viewvc?rev=586449&view=rev
Log:
Applied patch from Jeremy Wickersheimer OFBIZ-1118 to provide a default value for the pagination-target: if not specified, now the attribute is retrieved from the request target uri.
It is now possible to remove most of (if not all) the paginate-target attributes set in form definitions.

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=586449&r1=586448&r2=586449&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 Fri Oct 19 06:42:47 2007
@@ -2085,15 +2085,14 @@
         this.type = string;
     }
 
-    /**
-     * @return
-     */
     public String getPaginateTarget(Map context) {
         String targ = this.paginateTarget.expandString(context);
         if (UtilValidate.isEmpty(targ)) {
-            targ = getTarget(context, null);
+            Map parameters = (Map) context.get("parameters");
+            if (parameters != null && parameters.containsKey("targetRequestUri")) {
+                targ = (String) parameters.get("targetRequestUri");
+            }
         }
-        
         return targ;
     }