Class ServerCallbackAction
java.lang.Object
com.vaadin.flow.component.trigger.AbstractAction
com.vaadin.flow.component.trigger.internal.ServerCallbackAction
- All Implemented Interfaces:
Action,Serializable
Action that runs a server-side
SerializableRunnable when its trigger
fires. Used by
Trigger.triggers(SerializableRunnable).
On the client, the flow:server-callback factory's run()
simply notifies the server via the per-host return channel; the server's
TriggerSupport.dispatchMirror then invokes
applyServerSideEffect() which calls the wrapped runnable on the UI
thread.
For internal use only.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMirrors the client-side effect on the server.Methods inherited from class com.vaadin.flow.component.trigger.AbstractAction
buildClientConfig, getTypeId
-
Field Details
-
TYPE_ID
- See Also:
-
-
Constructor Details
-
ServerCallbackAction
- Parameters:
handler- the server-side handler, notnull
-
-
Method Details
-
getHandler
- Returns:
- the wrapped handler
-
applyServerSideEffect
public void applyServerSideEffect()Description copied from class:AbstractActionMirrors the client-side effect on the server. Called on the UI thread, at the start of the same server cycle that processes the triggering DOM event, before any user-attached event listeners run, so that listener code observes the post-action state.Default is a no-op. Subclasses with a server-observable effect (e.g.
SetEnabledAction) override this.- Overrides:
applyServerSideEffectin classAbstractAction
-