Re: Using class constant in if tag

2007-11-17 Thread Shyamal Mehta
Thanks Wesley, that works.

On Nov 17, 2007 1:12 PM, Wes Wannemacher [EMAIL PROTECTED] wrote:
 I haven't tried it, but I don't think that OGNL cares about your
 imports. If your constant is static, then try -
 s:if test=status == @[EMAIL PROTECTED]


 On 11/16/07, Shyamal Mehta [EMAIL PROTECTED] wrote:
  Hi,
 
  I am using the struts if tag and want to use a constant from another
  class inside the if test condition.
  How can I do it?
 
  The relevant code snippet is:
  
  %@ taglib prefix=s uri=/struts-tags %
  [EMAIL PROTECTED] import=com.example.Account%
  
  s:if test=status == Account.ACCOUNT_STATUS_ACTIVE 
  Display message here.
  /s:if
 
 
  The status is a property of my action.
 
  Thanks,
  SM
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Wesley Wannemacher
 President, Head Engineer/Consultant
 WanTii, Inc.
 http://www.wantii.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]



Re: Using class constant in if tag

2007-11-16 Thread Wes Wannemacher
I haven't tried it, but I don't think that OGNL cares about your
imports. If your constant is static, then try -
s:if test=status == @[EMAIL PROTECTED]

On 11/16/07, Shyamal Mehta [EMAIL PROTECTED] wrote:
 Hi,

 I am using the struts if tag and want to use a constant from another
 class inside the if test condition.
 How can I do it?

 The relevant code snippet is:
 
 %@ taglib prefix=s uri=/struts-tags %
 [EMAIL PROTECTED] import=com.example.Account%
 
 s:if test=status == Account.ACCOUNT_STATUS_ACTIVE 
 Display message here.
 /s:if


 The status is a property of my action.

 Thanks,
 SM

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




-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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