hi,

this patch adds prefix & suffix "*"-wildcard notation to excludedParams.
rationale: i found it effectively impossible to keep excludedParams in
sync with the actual parameter set. so now all my "action" parameters
are prefixed with a- and the exclusion pattern is a-*

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
Index: main/java/org/displaytag/tags/TableTag.java
===================================================================
--- main/java/org/displaytag/tags/TableTag.java (revision 1088)
+++ main/java/org/displaytag/tags/TableTag.java (working copy)
@@ -1089,7 +1089,37 @@
             {
                 for (int j = 0; j < splittedExcludedParams.length; j++)
                 {
-                    baseHref.removeParameter(splittedExcludedParams[j]);
+                    String sep = splittedExcludedParams[j];
+                    if (sep.endsWith("*"))
+                    {
+                        sep = sep.substring(0, sep.length() - 1);
+                        Iterator paramsIterator = 
baseHref.getParameterMap().keySet().iterator();
+                        while (paramsIterator.hasNext())
+                        {
+                            String key = (String) paramsIterator.next();
+                            if (key.startsWith(sep))
+                            {
+                                baseHref.removeParameter(key);
+                            }
+                        }
+                    }
+                    else if (sep.startsWith("*"))
+                    {
+                        sep = sep.substring(1);
+                        Iterator paramsIterator = 
baseHref.getParameterMap().keySet().iterator();
+                        while (paramsIterator.hasNext())
+                        {
+                            String key = (String) paramsIterator.next();
+                            if (key.endsWith(sep))
+                            {
+                                baseHref.removeParameter(key);
+                            }
+                        }
+                    }
+                    else
+                    {
+                        baseHref.removeParameter(sep);
+                    }
                 }
             }
         }
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to