Try - 

 <s:if test="%{interval == @[EMAIL PROTECTED]">
                  anno <s:date name="dataInizio" format="yyyy" />
 </s:if>

> -----Original Message-----
> From: setecastronomy [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 27, 2007 7:35 AM
> To: user@struts.apache.org
> Subject: If Tag: testing for an enumerated value
> 
> 
> Somewhere I have the following enumeration public enum Interval {
>     GENERIC,
>     MONTH,
>     YEAR;
> }
> 
> The action has the following method:
> 
> public Interval getInterval() {return iInterval;}
> 
> I supposed I could test the enumerated value inside my jsp in 
> the following
> way:
> 
> <s:if test="%{interval == Interval.YEAR}">
>                  anno <s:date name="dataInizio" format="yyyy" />
> </s:if>    
> 
> but it doesn't work.
> 
> The only solution I found was to to insert a 
> 
> boolean  isYear() 
> 
> method inside the action combined with a 
> 
> <s:if test="%{year}">
> 
> Can you suggest a better way?
> 
> Thanks
> Filippo
> --
> View this message in context: 
> http://www.nabble.com/If-Tag%3A-testing-for-an-enumerated-valu
> e-tf4527832.html#a12919403
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to