Package org.opencms.gwt.client.util
Class CmsScriptCallbackHelper
java.lang.Object
org.opencms.gwt.client.util.CmsScriptCallbackHelper
Helper class used to create a native Javascript function to call into GWT code.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.gwt.core.client.JavaScriptObjectThe stored arguments. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.core.client.JavaScriptObjectCreates a native JS function which, when executed, calls this object's run() method.voidInstalls the Javascript function generated by this helper as a global function, i.e.voidrun()This method is called by the callback created by createCallback().voidsetArguments(com.google.gwt.core.client.JavaScriptObject arguments) Sets the function arguments so they can be accessed later in the run() method.
-
Field Details
-
m_arguments
The stored arguments.
-
-
Constructor Details
-
CmsScriptCallbackHelper
public CmsScriptCallbackHelper()
-
-
Method Details
-
createCallback
Creates a native JS function which, when executed, calls this object's run() method.- Returns:
- the JS function
-
installCallbackOnWindow
Installs the Javascript function generated by this helper as a global function, i.e. an attribute on 'window'.- Parameters:
name- the function name
-
run
This method is called by the callback created by createCallback(). -
setArguments
Sets the function arguments so they can be accessed later in the run() method.- Parameters:
arguments- the function arguments
-