cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hoskens>
Subject Re: JXTemplate test condition
Date Mon, 22 Nov 2004 09:49:55 GMT
You need to set the complete jexl expression in the curly braces , and 
if working with strings, I prefer .equals():

<jx:when test="${value1.equals('1') and not(value2.equals('2'))}/>

use and/or/not as operators (more on this at:

Kind Regards,

oceatoon wrote:

>pguillard wrote:
>>Basic question but i can't find the answer: how to write a more complex
>>test condition in JXT exprerssion
>>        <jx:choose>
>>            <jx:when test="${value1=='1'} and ${value2=='2'}">
>>            or  <jx:when test="${value1=='1'} &amp;&amp; ${value2=='2'}">
>>            or <jx:when test="${value1=='1' &amp;&amp; value2=='2'}">
>This might simply be a syntax problem Phil, once you're in a ${} you can
>manipulate all jx variable from the context
>I haven't tried this but don't see why it wouldn't run   
><jx:when test="${(value1=='1' &amp;&amp; value2=='2') || (value1=='1' and
>$value2=='2')} ">
>            ...etc
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message