| java.lang.Object org.apache.cocoon.woody.util.JavaScriptHelper
JavaScriptHelper | public class JavaScriptHelper (Code) | | Helper methods to use JavaScript in various locations of the Woody configuration files
such as event listeners and bindings.
author: Sylvain Wallez version: CVS $Id: JavaScriptHelper.java 433543 2006-08-22 06:22:54Z crossley $ |
buildFunction | public static Function buildFunction(Element element, String[] argumentNames) throws IOException(Code) | | Build a function with the content of a DOM element.
Parameters: element - the element containing the function body Parameters: argumentNames - names of the function arguments the compiled function throws: IOException - |
buildScript | public static Script buildScript(Element element) throws IOException(Code) | | Build a script with the content of a DOM element.
Parameters: element - the element containing the script the compiled script throws: IOException - |
callFunction | public static Object callFunction(Function func, Object thisObject, Object[] arguments, Map objectModel) throws JavaScriptException(Code) | | |
execScript | public static Object execScript(Script script, Map values, Map objectModel) throws JavaScriptException(Code) | | |
getParentScope | public static Scriptable getParentScope(Map objectModel)(Code) | | Get a parent scope for building a child scope. The request is searched for an existing scope
that can be provided by a flowscript higher in the call stack, giving visibility to flowscript
functions and global (session) variables.
Parameters: objectModel - an objectModel where the flowscript scope will be searched (can be null ). an appropriate parent scope. |
getRootScope | public static Scriptable getRootScope()(Code) | | Get a root scope for building child scopes.
an appropriate root scope |
|
|