cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From H.vanderLin...@MI.unimaas.nl
Subject RE: JxTemplate indirect evaluation of expressions
Date Mon, 17 May 2004 10:56:51 GMT
Hmm, could you give an example? I cannot think of one. 
I sometimes use a choose, to decide which property to use, but that is only
feasible when the number of choices is small (otherwise the code becomes
unmanageable).

Bye, Helma

> -----Original Message-----
> From: Danny Bols [mailto:dbols@osirion.be] 
> Sent: Monday, 17 May 2004 09:31
> To: users@cocoon.apache.org
> Subject: RE: JxTemplate indirect evaluation of expressions
> 
> 
> I guess I need to clarify my use case. In my situation I do 
> not know the name of the property at compile-time, only at 
> run-time. That is why I need indirect evaluation.
> --
> Danny
> 
> > -----Original Message-----
> > From: H.vanderLinden@MI.unimaas.nl 
> > [mailto:H.vanderLinden@MI.unimaas.nl]
> > Sent: maandag 17 mei 2004 9:04
> > To: users@cocoon.apache.org
> > Subject: RE: JxTemplate indirect evaluation of expressions
> >
> >
> > I'm not 100% sure, but I don't think so, but you could 
> always rewrite 
> > it to:
> >
> > <jx:forEach var="customer" items="${customers}">
> >  <jx:set var="myProperty" value="${customer.name}"/>
> >    evaluate this...
> >       ${myProperty}
> > </jx:forEach>
> >
> >
> > HTH.
> >
> > Bye, Helma
> >
> > > -----Original Message-----
> > > From: Danny Bols [mailto:dbols@osirion.nl]
> > > Sent: Friday, 14 May 2004 22:38
> > > To: Cocoon Users
> > > Subject: JxTemplate indirect evaluation of expressions
> > >
> > >
> > > Is this kind of indirect evaluation possible in a jx-template?
> > >
> > > <jx:set var="myProperty" value="customer.name"/>
> > >
> > > <jx:forEach var="customer" items="${customers}">
> > >
> > >   evaluate this...
> > >      ${myProperty}
> > >   as if i was writing this...
> > >      ${customer.name}
> > >
> > > </jx:forEach>
> > >
> > > --
> > > Danny
> > >
> > >
> > > 
> --------------------------------------------------------------------
> > > -
> > > 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


Mime
View raw message