[OT(?)] Comparing against a typesafe enum in JSTL

2004-08-26 Thread Janne Mattila
First, apologies for a slightly OT question; this is more about JSTL and less about Struts. Let's say I have a Role object in session. It is a typesafe enum, with values Role.ADMIN and Role.USER. How can I compare the object in session against those values, using JSTL? I can't figure out how

Re: [OT(?)] Comparing against a typesafe enum in JSTL

2004-08-26 Thread Can Zheng
Hi, you can use c:when test=${sessionScope.role.roleChar.equals(cd.business.Role.ADMIN)} ... On Thu, 26 Aug 2004 12:09:56 +, Janne Mattila [EMAIL PROTECTED] wrote: First, apologies for a slightly OT question; this is more about JSTL and less about Struts. Let's say I have a Role

Re: [OT(?)] Comparing against a typesafe enum in JSTL

2004-08-26 Thread Janne Mattila
? From: Can Zheng [EMAIL PROTECTED] Reply-To: Can Zheng [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: [OT(?)] Comparing against a typesafe enum in JSTL Date: Thu, 26 Aug 2004 20:32:27 +0800 Hi, you can use c:when test=${sessionScope.role.roleChar.equals

RE: [OT(?)] Comparing against a typesafe enum in JSTL

2004-08-26 Thread Paul McCulloch
, August 26, 2004 1:42 PM To: [EMAIL PROTECTED] Subject: Re: [OT(?)] Comparing against a typesafe enum in JSTL Um, no, doesn't work: [ServletException in:/pages/cd/content/common/menu.jsp] jsp.error.tlv.invalid.page 10: tag = 'when' / attribute = 'test': An error occurred while parsing

Re: [OT(?)] Comparing against a typesafe enum in JSTL

2004-08-26 Thread Nicolas De Loof
] Subject: Re: [OT(?)] Comparing against a typesafe enum in JSTL Um, no, doesn't work: [ServletException in:/pages/cd/content/common/menu.jsp] jsp.error.tlv.invalid.page 10: tag = 'when' / attribute = 'test': An error occurred while parsing custom action attribute test with value

Re: [OT(?)] Comparing against a typesafe enum in JSTL

2004-08-26 Thread Bill Siggelkow
-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [OT(?)] Comparing against a typesafe enum in JSTL Date: Thu, 26 Aug 2004 13:54:27 +0100 I've asked this before on the list and didn't get a neat answer. I've resorted to using c:set