[JBoss-user] [HTTPD, Servlets & JSP] - Re: Using enums on JSP pages

2005-04-06 Thread treespace
Correction: public class ColorMap extends TreeMap { |public ColorMap() { | for(Color value : Color.values()) { | put(value.name(), value.name()); | } |} | } View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872938#3872938

[JBoss-user] [HTTPD, Servlets & JSP] - Re: Using enums on JSP pages

2005-04-06 Thread treespace
I have come up with a solution so elegant it brings tears to my eyes:) Color is an enum. I convert it to a map that can be useBean'd and dereferenced in EL. So my app uses the enum while the JSP uses the same enum in map form. Sweet! public class ColorMap extends TreeMap { public C