Interface Initialization
-
public interface Initialization
Provided byJavaScriptSupport.require(String)to allow additional, optional, details of the module-based page initialization to be configured.- Since:
- 5.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Initializationinvoke(java.lang.String functionName)Specifies the function to invoke.Initializationpriority(InitializationPriority priority)Changes the initialization priority of the initialization from its default,InitializationPriority.NORMAL.voidwith(java.lang.Object... arguments)Specifies the arguments to be passed to the function.
-
-
-
Method Detail
-
invoke
Initialization invoke(java.lang.String functionName)
Specifies the function to invoke. If this method is not invoked, then the module is expected to export just a single function (which may, or may not, take parameters).- Parameters:
functionName- name of a function exported by the module.- Returns:
- this Initialization, for further configuration
-
priority
Initialization priority(InitializationPriority priority)
Changes the initialization priority of the initialization from its default,InitializationPriority.NORMAL. Note: it is possible that this method may be removed before release 5.4 is final.- Parameters:
priority- new priority- Returns:
- this Initialization, for further configuration
-
with
void with(java.lang.Object... arguments)
Specifies the arguments to be passed to the function. Often, just a singleJSONObjectis passed. When multiple Initializations exist with the same function name (or no function name), and no arguments, they are coalesced into a single Initialization: it is assumed that an initialization with no parameters needs to only be invoked once.- Parameters:
arguments- any number of values. Each value may be one of: null, String, Boolean, Number,JSONObject,JSONArray, orJSONLiteral.
-
-