You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ciaran Hanley <ci...@sentenial.ie> on 2004/05/25 21:15:00 UTC
Logic Tags using OR
Can the struts logic tags be used to perform OR Logic?
For example instead of
<logic:equal name="user" property="key" value="1">
...do this
</logic:equal>
<logic:equal name="user" property="key" value="2">
...do this
</logic:equal>
<logic:equal name="user" property="key" value="3">
...do this
</logic:equal>
<logic:equal name="user" property="key" value="1 OR 2 OR 3">
...do this
</logic:equal>
Any ideas anybody?
Thanks
CH
Re: Logic Tags using OR
Posted by Nathan Maves <Na...@Sun.COM>.
Why not use jstl?
<c:if test="${user.key eq 1 || user.key eq 2}">
do something...
</c:if>
nathan
On May 25, 2004, at 1:15 PM, Ciaran Hanley wrote:
> Can the struts logic tags be used to perform OR Logic?
>
>
>
> For example instead of
>
>
>
> <logic:equal name="user" property="key" value="1">
>
> ...do this
>
> </logic:equal>
>
> <logic:equal name="user" property="key" value="2">
>
> ...do this
>
> </logic:equal>
>
> <logic:equal name="user" property="key" value="3">
>
> ...do this
>
> </logic:equal>
>
>
>
>
>
> <logic:equal name="user" property="key" value="1 OR 2 OR 3">
>
> ...do this
>
> </logic:equal>
>
>
>
> Any ideas anybody?
>
>
>
> Thanks
>
> CH
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org