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
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
?
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
, 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
]
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
-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
6 matches
Mail list logo