commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dion Gillard" <dion.gill...@gmail.com>
Subject Re: Assignments in Jexl
Date Mon, 27 Feb 2006 23:47:21 GMT
The current version of JEXL in SVN supports assignments.

If you need to do it using JEXL 1.0, make the context as a variable to
your script and use:

contextVar.getVars().put("varName", value)

On 2/28/06, הראל בן עטיה <baharel@netvision.net.il> wrote:
>
> Hi,
>
> I would like to know if there is a way to make variable assignments through
> Jexl expressions. Trying the obvious expression "x = val" returns an invalid
> expression exception. I've succeeded to do it by making x a class of my own
> and calling a setter method "x.set(50)" in the expression, but I would like
> to know if there is a more elegant way.
>
> Thanks a lot
> Harel Ben Attia
> Comverse Technologies Ltd.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


--
http://www.multitask.com.au/people/dion/
Chuck Norris sleeps with a night light. Not because Chuck Norris is
afraid of the dark, but because the dark is afraid of Chuck Norris
Mime
View raw message