webwork/src/main/webwork/view/taglib URLTag.java,1.8,1.9

[email protected] Mon, 17 Jun 2002 08:23:04 -0700
Newsgroups gmane.comp.java.webwork.cvs
Message-ID <[email protected]>
Update of /cvsroot/webwork/webwork/src/main/webwork/view/taglib
In directory usw-pr-cvs1:/tmp/cvs-serv23806

Modified Files:
	URLTag.java 
Log Message:
fixed to properly add params from request if value was not explicitly set

Index: URLTag.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/view/taglib/URLTag.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- URLTag.java	30 May 2002 22:57:47 -0000	1.8
+++ URLTag.java	17 Jun 2002 15:23:02 -0000	1.9
@@ -104,9 +104,16 @@
          link.append(requestURI);
       }
 
-      //if the body has not set our params, use the context
-      if (params==null && value==null) {
-         params = ((HttpServletRequest) pageContext.getRequest()).getParameterMap();
+      //if the value was not explicitly set grab the params from the request
+      if (value==null) {
+         try {
+            if (params==null) {
+               params = new HashMap();
+            }
+            params.putAll(((HttpServletRequest) pageContext.getRequest()).getParameterMap());
+         } catch (Exception e) {
+            Category.getInstance(this.getClass()).warn("Unable to put request parameters into parameter map.", e);
+         }
       }
 
       if (params != null && params.size() > 0) {



_______________________________________________________________

Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/