A patch for a minor problem in PopulateHelper

Showing 1-2 of 2 messages
A patch for a minor problem in PopulateHelper Thomas Hallgren 3/27/12 9:00 AM
I tried to use w:populate on a select with values that contained
parenthesis. That didn't work as expected. I traced it down to a
missing quote where the value is treated as a regexp. Here's a patch
that fixes the problem:

web4j/src/hirondelle/web4j/ui/tag/PopulateHelper.java
@@ -448,7 +448,7 @@
       fLogger.finest("Value attr: " + valueAttr);
       if ( aPrepopValues.contains(valueAttr) ) {
         String editedOption = ensureSelected(matchForSelected,
option);
-        result = result.replaceAll(option, editedOption);
+        result = result.replaceAll(Pattern.quote(option),
editedOption);
       }
       else {
         String editedOption = ensureUnselected(matchForSelected,
option);
Re: A patch for a minor problem in PopulateHelper John O'Hanley 3/29/12 2:30 PM
Thank you!  Will apply to next release.

- John