You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gunter D'Hondt <gu...@sofico.be> on 2004/07/23 13:47:01 UTC
JX expression - strange jx:if behaviour
Hi,
I've got the following JX-code inside my xml:
<jx:set var="savebuttonvisible"
value="#{getAttribute($request,'savebutton')}"/>
Value=<jx:out value="${savebuttonvisible}"/>
<jx:if test="${savebuttonvisible}">
button
</jx:if>
And the following outcome:
Value=false
button
I've already tried other expressions like test="${savebuttonvisible}=true"
or test="${savebuttonvisible}='true'" but it always evaluates as true.
Any help is welcome,
Regards,
Gunter D'Hondt
SOFICO NV Belgium
Re: JX expression - strange jx:if behaviour
Posted by Gunter D'Hondt <gu...@sofico.be>.
Bruno,
Indeed, <jx:if test="#{$savebuttonvisible='true'}"> finally did the trick!
(cross # and single quotes ' are needed)
Regards,
Gunter
Bruno Dumon <br...@outerthought.org>
23/07/2004 14:44
Please respond to
users@cocoon.apache.org
To
users@cocoon.apache.org
cc
Subject
Re: JX expression - strange jx:if behaviour
On Fri, 2004-07-23 at 13:47, Gunter D'Hondt wrote:
> Hi,
>
> I've got the following JX-code inside my xml:
> <jx:set var="savebuttonvisible"
> value="#{getAttribute($request,'savebutton')}"/>
> Value=<jx:out value="${savebuttonvisible}"/>
> <jx:if test="${savebuttonvisible}">
> button
> </jx:if>
>
> And the following outcome:
> Value=false
> button
>
> I've already tried other expressions like
> test="${savebuttonvisible}=true" or test="${savebuttonvisible}='true'"
> but it always evaluates as true.
The expression is always inside the ${} or #{}, so putting "=true"
outside of these won't do anything.
Try:
${savebuttonvisible=true}
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: JX expression - strange jx:if behaviour
Posted by Bruno Dumon <br...@outerthought.org>.
On Fri, 2004-07-23 at 13:47, Gunter D'Hondt wrote:
> Hi,
>
> I've got the following JX-code inside my xml:
> <jx:set var="savebuttonvisible"
> value="#{getAttribute($request,'savebutton')}"/>
> Value=<jx:out value="${savebuttonvisible}"/>
> <jx:if test="${savebuttonvisible}">
> button
> </jx:if>
>
> And the following outcome:
> Value=false
> button
>
> I've already tried other expressions like
> test="${savebuttonvisible}=true" or test="${savebuttonvisible}='true'"
> but it always evaluates as true.
The expression is always inside the ${} or #{}, so putting "=true"
outside of these won't do anything.
Try:
${savebuttonvisible=true}
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org