geirm 02/04/26 14:25:07 Modified: jexl/examples MethodPropertyExample.java ArrayExample.java Log: Fix - update to latest JexlContext Revision Changes Path 1.2 +3 -3 jakarta-commons-sandbox/jexl/examples/MethodPropertyExample.java Index: MethodPropertyExample.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jexl/examples/MethodPropertyExample.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MethodPropertyExample.java 26 Apr 2002 04:47:03 -0000 1.1 +++ MethodPropertyExample.java 26 Apr 2002 21:25:07 -0000 1.2 @@ -61,7 +61,7 @@ * simple example to show how to access method and properties * * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a> - * @version $Id: MethodPropertyExample.java,v 1.1 2002/04/26 04:47:03 geirm Exp $ + * @version $Id: MethodPropertyExample.java,v 1.2 2002/04/26 21:25:07 geirm Exp $ */ public class MethodPropertyExample { @@ -73,8 +73,8 @@ */ JexlContext jc = JexlHelper.createContext(); - jc.put("foo", new Foo()); - jc.put("number", new Integer(10)); + jc.getVars().put("foo", new Foo()); + jc.getVars().put("number", new Integer(10)); /* * access a method w/o args 1.2 +2 -2 jakarta-commons-sandbox/jexl/examples/ArrayExample.java Index: ArrayExample.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jexl/examples/ArrayExample.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ArrayExample.java 26 Apr 2002 04:47:03 -0000 1.1 +++ ArrayExample.java 26 Apr 2002 21:25:07 -0000 1.2 @@ -64,7 +64,7 @@ * simple example to show how to access arrays * * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a> - * @version $Id: ArrayExample.java,v 1.1 2002/04/26 04:47:03 geirm Exp $ + * @version $Id: ArrayExample.java,v 1.2 2002/04/26 21:25:07 geirm Exp $ */ public class ArrayExample { @@ -79,7 +79,7 @@ List l = new ArrayList(); l.add("Hello from location 0"); l.add(new Integer(2)); - jc.put("array", l); + jc.getVars().put("array", l); Expression e = ExpressionFactory.createExpression("array[1]"); Object o = e.evaluate(jc);
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>