Interface MPPWebControl
@GwtCompatible
public interface MPPWebControl
FirstSpirit JavaScript MPP API, accessible via "MPP_API".
Example:
Example:
if ("MPP_API".isParameterized()) { var gender = "MPP_API".getParameter("gender"); var age = "MPP_API".getParameter("age"); if (gender == "male" && age >= 18) { // ... } }
- Since:
- 5.2.28
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceListener for events about changes of the preview parametrization.static interfaceListener for events about changes of custom parameters.static interfaceListener for events about changes of date / time in MPP. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringJavaScript identifier for the instance of this MPP control object -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener to be informed when current preview parametrization is enabled/disabled by the user.voidAdds a listener to be informed when a custom preview parameter has changedvoidAdds a listener to be informed when the time parameter has changed.@Nullable ObjectgetParameter(@NotNull String name) Returns the current value of the specified preview parameter.@Nullable ObjectReturns the current time the user has chosen using the preview timeline.booleanReturns whether or not the current preview parametrization is enabled by the user.voidsetParameter(@NotNull String name, @Nullable Object value) Sets the current value of the specified preview parameter.voidsetTimeParameter(Object date) Set the time that should be used for preview.
-
Field Details
-
IDENTIFIER
JavaScript identifier for the instance of this MPP control object- Since:
- 5.2.28
- See Also:
-
-
Method Details
-
isParameterized
boolean isParameterized()Returns whether or not the current preview parametrization is enabled by the user.- Returns:
trueif preview has parameter,falseotherwise.- Since:
- 5.2.28
-
addParameterizedListener
Adds a listener to be informed when current preview parametrization is enabled/disabled by the user.
May be used only in WebEdit mode.
- Parameters:
listener- the listener to add- Since:
- 5.2.190301
-
getParameter
Returns the current value of the specified preview parameter. The return value may benullif there is no editor with the specified name, or if the editors value isnull.- Parameters:
name- name of the preview parameter to get the value for.- Returns:
- parameter value, or
nullfor the above mentioned reasons. - Since:
- 5.2.28
-
setParameter
Sets the current value of the specified preview parameter.- Parameters:
name- name of the preview parameter to set the value for.value- parameter value, ornullto clear the value.- Since:
- 5.2.28
-
addParameterListener
Adds a listener to be informed when a custom preview parameter has changed
May be used only in WebEdit mode.
- Parameters:
listener- the listener to add- Since:
- 5.2.190301
-
getTimeParameter
Returns the current time the user has chosen using the preview timeline.- Returns:
- the current time (as javascript
Date) object, ornull - Since:
- 5.2.28
-
setTimeParameter
Set the time that should be used for preview.- Parameters:
date- the time (as javascriptDate) object, ornull- Since:
- 5.2.28
-
addTimeParameterListener
Adds a listener to be informed when the time parameter has changed.
May be used only in WebEdit mode.
- Parameters:
listener- the listener to add- Since:
- 5.2.190301
-