Thanks for your help!

But <s:if test="%{#parameters.all == 'true'}" > doesn' t work neither.

The else part is displayed everytime.




-----Ursprüngliche Nachricht-----
Von: Lukasz Lenart [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. Dezember 2008 10:27
An: Struts Users Mailing List
Betreff: Re: How to use s:if

2008/12/11  <[EMAIL PROTECTED]>:
> http:/appsever:8080/myapp/showaction?all=true
> in my jsp I want to use the s:if to display different strings
> i.e.
> <s:if test="%{all == 'true'}" >
> ...
> But how to write the test condition?

Check with docs [1], it should be
<s:if test="%{#parameters.all == 'true'}" >

> By the way. What does the % in a condition like %{test}
> And what is # in a condition like %{#test}?

# is used to change the default scope which is action, check OGNL basis

[1] http://struts.apache.org/2.x/docs/ognl.html
[2] http://struts.apache.org/2.x/docs/ognl-basics.html


Regards
--
Lukasz
http://www.lenart.org.pl/

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


Reply via email to