Expression Handling Again

Dan Miller <[email protected]> Thu, 22 Sep 2005 08:46:44 -0700 (PDT)
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
The usage of the StringMacro to use the #set directive
works great. I was wondering if there is anything
exposed to evaluate the expression without modifying
the context. 

This works great, but I would like to leave the
context as is, not adding new temp variables to the
context.

Context ctx = new Context();
ctx.put("val1", 1);
ctx.put("val2", 155);
Macro macro = null;
macro = new StringMacro("#set $val = $val1 + $val2");
macro.evaluate( ctx);
Integer val = (Integer)ctx.get("val");


I am looking forward to the 2.0 release. 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php