cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noureddine BEKRAR" <nbek...@rennes.jouve.fr>
Subject Re: jx:choose don't work
Date Wed, 11 Aug 2004 16:07:20 GMT
oh Sorry,
i did a mistake when i wrote the email,

My code is like you say but the two actions are performed.

<jx:set var="role"

value="#{getAttribute($session,'user-role-id')}"/>



<jx:choose xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">

<jx:when test="${role == 'admin'}">

do something
</jx:when>
<jx:otherwise>

do other thing

</jx:otherwise>

</jx:choose>




----- Original Message ----- 
From: "Antonio Gallardo" <agallardo@agssa.net>
To: <users@cocoon.apache.org>
Sent: Wednesday, August 11, 2004 6:01 PM
Subject: Re: jx:choose don't work


> Noureddine BEKRAR dijo:
> > Hi all,
> >
> > I have in my template page this jxtemplate code, the problem is that the
"
> > do some thing " action and " do other thing " action are the two
> > performed.
> >
> > <jx:set var="role"
> >
> > value="#{getAttribute($session,'user-role-id')}"/>
> >
> >
> >
> > <jx:choose xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
> >
> > <jx:when test="${role == 'admin'}">
>
>   Here inser the conditional
> >
> > </jx:when>
> >
> > do something
>
>   ^^^^^
>   |||| -> This line is always executed (it is outside the "jx:choose")
> >
> > <jx:otherwise>
> >
> > do other thing
> >
> > </jx:otherwise>
> >
> > </jx:choose>
> >
>
> Best Regards,
>
> Antonio Gallardo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message