You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ge...@apache.org on 2002/04/26 23:25:07 UTC
cvs commit: jakarta-commons-sandbox/jexl/examples MethodPropertyExample.java ArrayExample.java
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:geirm@apache.org">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:geirm@apache.org">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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>