Hi Roger, I usually use
<s:if test="%{typ...@com.mypackage@MY_ENUM_VALUE}"> Denis. RogerV wrote: > > > > Gregor Marinšek wrote: >> >> You don't have to use "value", because s:iterator puts the value on the >> top of ValueStack. What about: >> >> <s:if test="%{type=='ENUM'}"> >> I assume you are iterating over objects, with defined get/setType >> Gregor >> > > Thanks Gregor, that works - in conjunction with another older nabble post > which discusses whether the "object" returned implemented the equals > method. In fact "type" is an Enum - so I provided a method on my Action to > return the value as a String and called that instead, so now I've got > <s:if test="%{typeAsString=='ENUM'}"> which works whereas <s:if > test="%{type=='ENUM'}"> doesn't. > > For future reference, how would I handle an Enum in <s:if> (I'm not > confusing things, the > value ENUM is one of the values of the Enum type in this instance) > > Regards > -- View this message in context: http://www.nabble.com/Struts-2-%3Cs%3Aif%3E-tag-tp25801138p25815556.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org