You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Noureddine BEKRAR <nb...@rennes.jouve.fr> on 2004/08/11 17:07:34 UTC

jx:choose don't work

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'}">

</jx:when>

do something

<jx:otherwise>

do other thing

</jx:otherwise>

</jx:choose>


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


Re: jx:choose don't work

Posted by Antonio Gallardo <ag...@agssa.net>.
Noureddine BEKRAR dijo:
> Ok thank you Antonio, I will use java code on the XSP.

Or use JXT generator with flow.... ;-)

Best Regards,

Antonio Gallardo
>
> ----- Original Message -----
> From: "Antonio Gallardo" <ag...@agssa.net>
> To: <us...@cocoon.apache.org>
> Sent: Wednesday, August 11, 2004 7:03 PM
> Subject: Re: jx:choose don't work
>
>
>> Noureddine BEKRAR dijo:
>> > Antonio,
>> >
>> > this is a complete XSP  page that i tested, it's perfom the two
>> actions
>> > admin and not admin, is any thing wrong in it?
>> >
>> > the value of  value="#{getAttribute($session,'user-role-id')}" is
>> right.
>>
>> How we can use XSP and JXTemplate Generator?
>>
>> AFAIK, the only idea to use it in that way is:
>>
>> a pipeline that use a XSP generator and output and XML with JX Template
>> info that is the input of another pipeline.
>>
>> Is this your case?
>>
>> But if you are using just the xsp generator (aka. serverpages) then you
>> cannot use JX syntax at all inside the code.
>>
>> Best Regards,
>>
>> Antonio Gallardo.
>>
>>
>> >
>> >
>> >
>> >
>> > ----- Original Message -----
>> > From: "Antonio Gallardo" <ag...@agssa.net>
>> > To: <us...@cocoon.apache.org>
>> > Sent: Wednesday, August 11, 2004 6:22 PM
>> > Subject: Re: jx:choose don't work
>> >
>> >
>> >> OK.
>> >>
>> >> Can you check what is the value for:
>> >>
>> >> value="#{getAttribute($session,'user-role-id')}"
>> >>
>> >> Also, please try to not mix between #{$...} and ${...} syntax.
>> >>
>> >> In the below case you use for set one syntax and for test another
>> >> syntax.
>> >> I am not telling this is why both statements are executed. If both
>> >> statements are in fact executed, then there is a bug that need to be
>> >> fixed.
>> >>
>> >> Can you provide a test case of that?
>> >>
>> >> Best Regards,
>> >>
>> >> Antonio Gallardo
>> >>
>> >>
>> >>
>> >> Noureddine BEKRAR dijo:
>> >> > 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" <ag...@agssa.net>
>> >> > To: <us...@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
>> >> >
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>


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


Re: jx:choose don't work

Posted by Noureddine BEKRAR <nb...@rennes.jouve.fr>.
Ok thank you Antonio, I will use java code on the XSP.

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


> Noureddine BEKRAR dijo:
> > Antonio,
> >
> > this is a complete XSP  page that i tested, it's perfom the two actions
> > admin and not admin, is any thing wrong in it?
> >
> > the value of  value="#{getAttribute($session,'user-role-id')}" is right.
>
> How we can use XSP and JXTemplate Generator?
>
> AFAIK, the only idea to use it in that way is:
>
> a pipeline that use a XSP generator and output and XML with JX Template
> info that is the input of another pipeline.
>
> Is this your case?
>
> But if you are using just the xsp generator (aka. serverpages) then you
> cannot use JX syntax at all inside the code.
>
> Best Regards,
>
> Antonio Gallardo.
>
>
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Antonio Gallardo" <ag...@agssa.net>
> > To: <us...@cocoon.apache.org>
> > Sent: Wednesday, August 11, 2004 6:22 PM
> > Subject: Re: jx:choose don't work
> >
> >
> >> OK.
> >>
> >> Can you check what is the value for:
> >>
> >> value="#{getAttribute($session,'user-role-id')}"
> >>
> >> Also, please try to not mix between #{$...} and ${...} syntax.
> >>
> >> In the below case you use for set one syntax and for test another
> >> syntax.
> >> I am not telling this is why both statements are executed. If both
> >> statements are in fact executed, then there is a bug that need to be
> >> fixed.
> >>
> >> Can you provide a test case of that?
> >>
> >> Best Regards,
> >>
> >> Antonio Gallardo
> >>
> >>
> >>
> >> Noureddine BEKRAR dijo:
> >> > 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" <ag...@agssa.net>
> >> > To: <us...@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
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>
> ---------------------------------------------------------------------
> 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


Re: jx:choose don't work

Posted by Antonio Gallardo <ag...@agssa.net>.
Noureddine BEKRAR dijo:
> Antonio,
>
> this is a complete XSP  page that i tested, it's perfom the two actions
> admin and not admin, is any thing wrong in it?
>
> the value of  value="#{getAttribute($session,'user-role-id')}" is right.

How we can use XSP and JXTemplate Generator?

AFAIK, the only idea to use it in that way is:

a pipeline that use a XSP generator and output and XML with JX Template
info that is the input of another pipeline.

Is this your case?

But if you are using just the xsp generator (aka. serverpages) then you
cannot use JX syntax at all inside the code.

Best Regards,

Antonio Gallardo.


>
>
>
>
> ----- Original Message -----
> From: "Antonio Gallardo" <ag...@agssa.net>
> To: <us...@cocoon.apache.org>
> Sent: Wednesday, August 11, 2004 6:22 PM
> Subject: Re: jx:choose don't work
>
>
>> OK.
>>
>> Can you check what is the value for:
>>
>> value="#{getAttribute($session,'user-role-id')}"
>>
>> Also, please try to not mix between #{$...} and ${...} syntax.
>>
>> In the below case you use for set one syntax and for test another
>> syntax.
>> I am not telling this is why both statements are executed. If both
>> statements are in fact executed, then there is a bug that need to be
>> fixed.
>>
>> Can you provide a test case of that?
>>
>> Best Regards,
>>
>> Antonio Gallardo
>>
>>
>>
>> Noureddine BEKRAR dijo:
>> > 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" <ag...@agssa.net>
>> > To: <us...@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
>> >
>>
>>
>> ---------------------------------------------------------------------
>> 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


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


Re: jx:choose don't work

Posted by Noureddine BEKRAR <nb...@rennes.jouve.fr>.
Antonio,

this is a complete XSP  page that i tested, it's perfom the two actions
admin and not admin, is any thing wrong in it?

the value of  value="#{getAttribute($session,'user-role-id')}" is right.




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


> OK.
>
> Can you check what is the value for:
>
> value="#{getAttribute($session,'user-role-id')}"
>
> Also, please try to not mix between #{$...} and ${...} syntax.
>
> In the below case you use for set one syntax and for test another syntax.
> I am not telling this is why both statements are executed. If both
> statements are in fact executed, then there is a bug that need to be
> fixed.
>
> Can you provide a test case of that?
>
> Best Regards,
>
> Antonio Gallardo
>
>
>
> Noureddine BEKRAR dijo:
> > 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" <ag...@agssa.net>
> > To: <us...@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
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: jx:choose don't work

Posted by Antonio Gallardo <ag...@agssa.net>.
OK.

Can you check what is the value for:

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

Also, please try to not mix between #{$...} and ${...} syntax.

In the below case you use for set one syntax and for test another syntax.
I am not telling this is why both statements are executed. If both
statements are in fact executed, then there is a bug that need to be
fixed.

Can you provide a test case of that?

Best Regards,

Antonio Gallardo



Noureddine BEKRAR dijo:
> 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" <ag...@agssa.net>
> To: <us...@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
>


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


Re: jx:choose don't work

Posted by Noureddine BEKRAR <nb...@rennes.jouve.fr>.
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" <ag...@agssa.net>
To: <us...@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


Re: jx:choose don't work

Posted by Antonio Gallardo <ag...@agssa.net>.
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