ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r670248 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
Date Sat, 21 Jun 2008 18:38:37 GMT
Author: adrianc
Date: Sat Jun 21 11:38:33 2008
New Revision: 670248

URL: http://svn.apache.org/viewvc?rev=670248&view=rev
Log:
Fixed bug in form widget rendering. Request parameters were being dropped while rendering
the pagination links.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=670248&r1=670247&r2=670248&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Sat Jun 21
11:38:33 2008
@@ -1184,17 +1184,15 @@
 
     public void renderFormatListWrapperOpen(Appendable writer, Map<String, Object>
context, ModelForm modelForm) throws IOException {
 
-        String queryString = null;
-        if (UtilValidate.isNotEmpty((String)context.get("queryString"))) {
-            queryString = (String)context.get("queryString");
-        } else {
-            Map<String, Object> inputFields = UtilGenerics.checkMap(context.get("requestParameters"));
-            // strip out any multi form fields if the form is of type multi
-            if (modelForm.getType().equals("multi")) {
-                inputFields = UtilHttp.removeMultiFormParameters(inputFields);
-            }
-            queryString = UtilHttp.urlEncodeArgs(inputFields);
+        Map<String, Object> inputFields = UtilGenerics.checkMap(context.get("requestParameters"));
+        Map<String, Object> queryStringMap = UtilGenerics.toMap(context.get("queryStringMap"));
+        if (UtilValidate.isNotEmpty(queryStringMap)) {
+            inputFields.putAll(queryStringMap);
+        }
+        if (modelForm.getType().equals("multi")) {
+            inputFields = UtilHttp.removeMultiFormParameters(inputFields);
         }
+        String queryString = UtilHttp.urlEncodeArgs(inputFields);
         context.put("_QBESTRING_", queryString);
 
         renderBeginningBoundaryComment(writer, "Form Widget", modelForm);



Mime
View raw message