struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Schröder" <simon.v...@gmx.de>
Subject Re: struts 2.0.11.2 <s:if test=""> problem
Date Wed, 20 Aug 2008 12:07:52 GMT
your user is in the session not on the value stack therefore you should try this:
<s:if test="#session.user.roleId==0">

/Stephan

-------- Original-Nachricht --------
> Datum: Wed, 20 Aug 2008 15:11:51 +0530
> Von: "ravindra" <ravindra@btpsoft.com>
> An: user@struts.apache.org
> Betreff: struts 2.0.11.2 <s:if test=""> problem

> Hi all,
> 
>  
> 
>             I have a user java bean object in my session; it has getter
> and
> setter for roleId.I have the following code in my jsp.Here I am trying to
> load different images
> 
> Based on the condition.
> 
>  
> 
> <s:if test="%{user.roleId}==0">
> 
>             <a href="rescue.action"><img src="images/tabs/Rescueadmin.jpg"
> style="border:none;" width="150" height="83"></a>
> 
> </s:if>
> 
> <s:else>
> 
>      <a href="rescue.action"><img src="images/tabs/five.jpg"
> style="border:none;" width="150" height="83"></a>
> 
> </s:else>
> 
>  
> 
> I think the syntax for test condition has changed in this version of
> struts.Please any one can help me with this issue.
> 
>  
> 
> Thankyou,
> 
> Ravindra.
> 
>  
> 

-- 
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message