cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject [Flow] Possible fix for passing objects from flow to view
Date Wed, 08 Jan 2003 20:51:27 GMT
The current flow code has a problem when passing Java object from the 
flow to the view using the sendPage and sendPageAndWait functions: all 
the values in the map that is passed as the second argument to the 
function get converted to strings. This makes it impossible to access 
field values using JXPath, as described in the documentation.

I've come up with the following fix. It does not break any of the 
examples and I've tested that Java objects are correctly passed. 
However, it was more or less a wild guess and I'd like the fix to be 
reviewed by Ovidiu or someone more knowledgeable than me about the 
internals of Rhino and the flow.

Here's the diff,


RCS file: 
retrieving revision 1.10
diff -u -r1.10
---       5 Dec 2002 09:37:20 -0000       1.10
+++       8 Jan 2003 20:21:13 -0000
@@ -271,7 +271,8 @@
        if (value == Undefined.instance)
          value = null;
-        value = ScriptRuntime.toPrimitive(value);
+        // value = ScriptRuntime.toPrimitive(value);
+        value = jsobjectToObject(value);
        hash.put(key, value);
      return hash;

To unsubscribe, e-mail:
For additional commands, email:

View raw message