The expression language supports 'or' and 'and' operations using either of
the common tokens ('or', '||', 'and', '&&')

So you could do

    <j:choose>
      <j:when test="${name.equalsIgnoreCase('foo') ||
name.equalsIgnoreCase('bar')}">
          do something
      </j:when>
      <j:otherwise>
        do something different
      </j:otherwise>
    </j:choose>

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Tim Stephenson" <[EMAIL PROTECTED]>
To: "Turbine Maven Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 20, 2002 9:23 AM
Subject: logical or in jelly expression


> Can anyone tell me how I can do the following in just one j:when tag?
>
>     <j:choose>
>       <j:when test="${name.equalsIgnoreCase('foo')}">
>         do something
>       </j:when>
>       <j:when test="${name.equalsIgnoreCase('bar')
>   do the same thing as for 'foo'
>       </j:when>
>       <j:otherwise>
>         do something different
>       </j:otherwise>
>     </j:choose>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to