cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rica...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom FOM_Cocoon.java
Date Sun, 23 Nov 2003 20:57:03 GMT
ricardo     2003/11/23 12:57:03

  Modified:    src/java/org/apache/cocoon/components/flow/javascript/fom
                        FOM_Cocoon.java
  Log:
  Ensure native Java object session attributes are stored unwrapped so that they can be safely
retrieved by Java code
  
  Revision  Changes    Path
  1.19      +5 -1      cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java
  
  Index: FOM_Cocoon.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FOM_Cocoon.java	20 Nov 2003 15:31:29 -0000	1.18
  +++ FOM_Cocoon.java	23 Nov 2003 20:57:03 -0000	1.19
  @@ -77,6 +77,7 @@
   import org.apache.cocoon.environment.http.HttpResponse;
   import org.mozilla.javascript.Context;
   import org.mozilla.javascript.JavaScriptException;
  +import org.mozilla.javascript.NativeJavaObject;
   import org.mozilla.javascript.Script;
   import org.mozilla.javascript.Scriptable;
   import org.mozilla.javascript.ScriptableObject;
  @@ -684,6 +685,9 @@
           }
           
           public void jsFunction_setAttribute(String name, Object value) {
  +            if (value instanceof NativeJavaObject) {
  +                value = ((NativeJavaObject) value).unwrap();
  +            }
               session.setAttribute(name, value);
           }
   
  
  
  

Mime
View raw message