webwork/src/main/webwork/view/taglib URLTag.java,1.9,1.10
[email protected] Sun, 23 Jun 2002 16:54:36 -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-serv30335
Modified Files:
URLTag.java
Log Message:
fixed so you can override request params with param tag parameters
Index: URLTag.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/view/taglib/URLTag.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- URLTag.java 17 Jun 2002 15:23:02 -0000 1.9
+++ URLTag.java 23 Jun 2002 23:54:34 -0000 1.10
@@ -68,16 +68,20 @@
} else {
value = page;
}
-
params = null;
-/*
- if (value == null) {
- // No particular page requested, so go to "same page"
- // Add query params to parameters
- urlParams = ((HttpServletRequest) pageContext.getRequest()).getParameterMap();
+ //no explicit url set so attach params from current url, do
+ //this at start so body params can override any of these they wish.
+ 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);
+ }
}
-*/
return EVAL_BODY_TAG;
}
@@ -105,16 +109,6 @@
}
//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) {
if (link.toString().indexOf("?") == -1) {
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/