Class ClickAction
java.lang.Object
com.vaadin.flow.component.trigger.AbstractAction
com.vaadin.flow.component.trigger.ClickAction
- All Implemented Interfaces:
Action,Serializable
Calls
target.click() on a target element, dispatching a synthetic
click event. Typically used to chain a trigger onto another component's click
handling — for example, a shortcut that fires the same path as a button
press.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClickAction(Component target) Creates a click action that clicks the given target component's root element.ClickAction(Element target) Creates a click action that clicks the given target element. -
Method Summary
Modifier and TypeMethodDescriptiontools.jackson.databind.node.ObjectNodebuildClientConfig(ConfigContext context) Produces the JSON configuration this action sends to the client.Methods inherited from class com.vaadin.flow.component.trigger.AbstractAction
applyServerSideEffect, getTypeId
-
Field Details
-
TYPE_ID
- See Also:
-
-
Constructor Details
-
ClickAction
Creates a click action that clicks the given target element.- Parameters:
target- the element to click, notnull
-
ClickAction
Creates a click action that clicks the given target component's root element.- Parameters:
target- the component to click, notnull
-
-
Method Details
-
getTarget
- Returns:
- the target element
-
buildClientConfig
Description copied from class:AbstractActionProduces the JSON configuration this action sends to the client. Default is an empty object; override to add type-specific options.Subclasses encode output references by calling
ConfigContext.registerOutput(Output)and element references by callingConfigContext.referenceElement(com.vaadin.flow.dom.Element). Public so the internal framework can read the config without reflection; subclasses just override.- Overrides:
buildClientConfigin classAbstractAction- Parameters:
context- the resolver for referenced elements and outputs, notnull- Returns:
- a Jackson
ObjectNode, nevernull
-