Author: nbelaevski
Date: 2009-08-25 08:30:48 -0400 (Tue, 25 Aug 2009)
New Revision: 15293
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
Log:
Added support for spaces-separated list in render/execute attributes
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-25
09:28:07 UTC (rev 15292)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-25
12:30:48 UTC (rev 15293)
@@ -635,13 +635,13 @@
}
// Tokenize string.
else if (valueToSet instanceof String) {
- String areasString = (String) valueToSet;
- if (areasString.indexOf(",") > 0) {
- return new LinkedHashSet<String>(Arrays.asList(areasString.trim().split(
- "(\\s)*,(\\s)*")));
+ String areasString = ((String) valueToSet).trim();
+ if (areasString.indexOf(",") > 0 || areasString.indexOf(" ")
> 0) {
+ return new LinkedHashSet<String>(Arrays.asList(areasString.split(
+ "(\\s*,\\s*)|(\\s+)")));
} else {
Set<String> areasSet = new LinkedHashSet<String>(5);
- areasSet.add(areasString.trim());
+ areasSet.add(areasString);
return areasSet;
}
Show replies by date