You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michaël JERUSALMI <mi...@hotmail.com> on 2010/05/17 16:52:03 UTC
Manipulating Strings with Struts²
Hi everyone,
I'm working on a Java Web App under Struts², and i'm having trouble using the taglib s:if.
I have a test <s:if>, but instead of writing a test like this <s:if test="string == myValue">,
I'd like to write something like this : <s:if test="string.contains(myValue)"> , or using a substring function
Do such functions exist ? How to use it ?
Thanks for your help.
Michael
_________________________________________________________________
Installez gratuitement les nouvelles Emoch'ticones !
http://www.ilovemessenger.fr/emoticones/telecharger-emoticones-emochticones.aspx
Re: Manipulating Strings with Struts²
Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/5/17 Michaël JERUSALMI <mi...@hotmail.com>:
> I'm working on a Java Web App under Struts², and i'm having trouble using the taglib s:if.
> I have a test <s:if>, but instead of writing a test like this <s:if test="string == myValue">,
> I'd like to write something like this : <s:if test="string.contains(myValue)"> , or using a substring function
> Do such functions exist ? How to use it ?
Yes, with OGNL, please check that tutorial:
http://www.roseindia.net/struts/struts2/struts2controltags/if-else.shtml
Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org