| java.lang.Object org.apache.cocoon.forms.util.JavaScriptHelper
JavaScriptHelper | public class JavaScriptHelper (Code) | | Helper methods to use JavaScript in various locations of the Cocoon Forms configuration files
such as event listeners and bindings.
version: $Id: JavaScriptHelper.java 518747 2007-03-15 20:30:03Z antonio $ |
buildFunction | public static Function buildFunction(Element element, String name, String[] argumentNames) throws IOException(Code) | | Build a function with the content of a DOM element.
Parameters: element - the element containing the function body Parameters: name - the name of the function 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 - the object model where the flowscript scope will be searched (can be null ). an appropriate parent scope. |
getRootScope | public static Scriptable getRootScope(Map objectModel)(Code) | | Get a root scope for building child scopes.
an appropriate root scope |
|
|