Author: alexsmirnov
Date: 2008-11-26 13:45:42 -0500 (Wed, 26 Nov 2008)
New Revision: 11402
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java
Log:
https://jira.jboss.org/jira/browse/RF-5004
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java 2008-11-26
15:58:57 UTC (rev 11401)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java 2008-11-26
18:45:42 UTC (rev 11402)
@@ -115,7 +115,12 @@
StringBuilder ret = new StringBuilder();
addEncodedString(ret, obj);
return ret.toString();
- }
+ } else if (obj instanceof Enum) {
+ // all other put as encoded strings.
+ StringBuilder ret = new StringBuilder();
+ addEncodedString(ret, obj);
+ return ret.toString();
+ }
// All other objects threaded as Java Beans.
try {
StringBuilder ret = new StringBuilder("{");