@GwtCompatible
public interface MPPWebControl
if ("MPP_API".isParameterized()
) { var gender = "MPP_API".getParameter("gender")
; var age = "MPP_API".getParameter("age")
; if (gender == "male" && age >= 18) { // ... } }
Modifier and Type | Interface and Description |
---|---|
static interface |
MPPWebControl.ParameterizedListener
Listener for events about changes of the preview parametrization.
|
static interface |
MPPWebControl.ParameterListener
Listener for events about changes of custom parameters.
|
static interface |
MPPWebControl.TimeParameterListener
Listener for events about changes of date / time in MPP.
|
Modifier and Type | Field and Description |
---|---|
static String |
IDENTIFIER
JavaScript identifier for the instance of this MPP control object
|
Modifier and Type | Method and Description |
---|---|
void |
addParameterizedListener(MPPWebControl.ParameterizedListener listener)
Adds a listener to be informed when current preview parametrization is enabled/disabled by the user.
|
void |
addParameterListener(MPPWebControl.ParameterListener listener)
Adds a listener to be informed when a custom preview parameter has changed
May be used only in WebEdit mode.
|
void |
addTimeParameterListener(MPPWebControl.TimeParameterListener listener)
Adds a listener to be informed when the time parameter has changed.
|
Object |
getParameter(String name)
Returns the current value of the specified preview parameter.
|
Object |
getTimeParameter()
Returns the current time the user has chosen using the preview timeline.
|
boolean |
isParameterized()
Returns whether or not the current preview parametrization is enabled by the user.
|
void |
setParameter(String name,
Object value)
Sets the current value of the specified preview parameter.
|
void |
setTimeParameter(Object date)
Set the time that should be used for preview.
|
static final String IDENTIFIER
boolean isParameterized()
true
if preview has parameter, false
otherwise.void addParameterizedListener(MPPWebControl.ParameterizedListener listener)
Adds a listener to be informed when current preview parametrization is enabled/disabled by the user.
May be used only in WebEdit mode.
listener
- the listener to add@Nullable Object getParameter(@NotNull String name)
null
if there is no editor with the
specified name, or if the editors value is null
.name
- name of the preview parameter to get the value for.null
for the above mentioned reasons.void setParameter(@NotNull String name, @Nullable Object value)
name
- name of the preview parameter to set the value for.value
- parameter value, or null
to clear the value.void addParameterListener(MPPWebControl.ParameterListener listener)
Adds a listener to be informed when a custom preview parameter has changed
May be used only in WebEdit mode.
listener
- the listener to add@Nullable Object getTimeParameter()
Date
) object, or null
void setTimeParameter(Object date)
date
- the time (as javascript Date
) object, or null
void addTimeParameterListener(MPPWebControl.TimeParameterListener listener)
Adds a listener to be informed when the time parameter has changed.
May be used only in WebEdit mode.
listener
- the listener to addCopyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210