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.JavaScriptObject
The stored arguments. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.core.client.JavaScriptObject
Creates a native JS function which, when executed, calls this object's run() method.void
Installs the Javascript function generated by this helper as a global function, i.e.void
run()
This method is called by the callback created by createCallback().void
setArguments
(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
-