Thomas Hallgren
unread,Mar 27, 2012, 12:00:19 PM3/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web4j-users
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);