From 23b3b8055bc16d4e57e93cb75d5dcd4da10fc877 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 11 Sep 2001 19:08:19 +0000 Subject: [PATCH] ESRequestData has been renamed to ESMapWrapper. Passing an instance of java.util.Map as argument to the invokeDirectFunction method will cause it to get wrapped in an ESMapWrapper, which exposes the elements in the Map in native JavaScript Object fashion. --- src/helma/framework/core/RequestEvaluator.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index 306c4bf6..3c825519 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -46,10 +46,11 @@ public class RequestEvaluator implements Runnable { Object result; Exception exception; protected ArrayPrototype reqPath; - private ESRequestData reqData; + private ESMapWrapper reqData; // vars for FESI EcmaScript support public Evaluator evaluator; + public ObjectPrototype esObjectPrototype; public ObjectPrototype esNodePrototype; public ObjectPrototype esUserPrototype; @@ -118,7 +119,7 @@ public class RequestEvaluator implements Runnable { appnode = new ESAppNode (app.appnode, this); global.putHiddenProperty ("app", appnode); reqPath = new ArrayPrototype (evaluator.getArrayPrototype(), evaluator); - reqData = new ESRequestData (this); + reqData = new ESMapWrapper (this); } catch (Exception e) { System.err.println("Cannot initialize interpreter"); @@ -199,7 +200,7 @@ public class RequestEvaluator implements Runnable { global.putHiddenProperty ("path", reqPath); global.putHiddenProperty ("app", appnode); // set and mount the request data object - reqData.setData (req.getReqData()); + reqData.setData (req.getRequestData()); req.data = reqData; try { @@ -662,7 +663,12 @@ public class RequestEvaluator implements Runnable { eso = getElementWrapper (obj); ESValue[] esv = args == null ? new ESValue[0] : new ESValue[args.length]; for (int i=0; i