cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r497415 - /cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
Date Thu, 18 Jan 2007 12:20:50 GMT
Author: cziegeler
Date: Thu Jan 18 04:20:49 2007
New Revision: 497415

URL: http://svn.apache.org/viewvc?view=rev&rev=497415
Log:
Apply patch for COCOON-1981

Modified:
    cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java

Modified: cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java?view=diff&rev=497415&r1=497414&r2=497415
==============================================================================
--- cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
(original)
+++ cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
Thu Jan 18 04:20:49 2007
@@ -588,9 +588,14 @@
                     }
                     cocoon.setParameters(parameters);
 
-                    Object fun = ScriptableObject.getProperty(thrScope, funName);
-                    if (fun == Scriptable.NOT_FOUND) {
-                        throw new ResourceNotFoundException("Function \"javascript:" + funName
+ "()\" not found");
+                    // Resolve function name
+                    // 
+                    Object fun;
+                    try {
+                        fun = context.compileString(funName, null, 1, null).exec (context,
thrScope);
+                    } catch (EcmaError ee) {
+                        throw new ResourceNotFoundException (
+                             "Function \"javascript:" + funName + "()\" not found");
                     }
 
                     thrScope.setLock(true);



Mime
View raw message