Class AbstractOutput<T>
java.lang.Object
com.vaadin.flow.component.trigger.AbstractOutput<T>
- Type Parameters:
T- the runtime type of the value produced
- All Implemented Interfaces:
Output<T>,Serializable
- Direct Known Subclasses:
JsOutput,PropertyOutput,SignalOutput
Base class for
Output implementations.
Subclasses identify themselves with a namespaced type id
("flow:property", "myapp:caret-offset", …) which must match a
factory registered against window.Vaadin.Flow.triggers on the client
side. Subclasses override buildClientConfig(com.vaadin.flow.component.trigger.internal.ConfigContext) when they need to ship
configuration with the output.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOutput(String typeId, Class<T> valueType) Creates a new output. -
Method Summary
Modifier and TypeMethodDescriptiontools.jackson.databind.node.ObjectNodebuildClientConfig(ConfigContext context) Produces the JSON configuration this output sends to the client.final StringThe namespaced type id of this output.The runtime type of the value this output produces.
-
Constructor Details
-
AbstractOutput
Creates a new output.- Parameters:
typeId- namespaced type id matching a client factory, notnullvalueType- runtime type of the produced value, notnull
-
-
Method Details
-
getTypeId
The namespaced type id of this output.- Returns:
- the type id, never
null
-
getValueType
The runtime type of the value this output produces.- Returns:
- the value type, never
null
-
buildClientConfig
Produces the JSON configuration this output sends to the client. Default is an empty object; override to add type-specific options.Subclasses encode element references by calling
ConfigContext.referenceElement(com.vaadin.flow.dom.Element). Public so the internal framework can read the config without reflection; subclasses just override.- Parameters:
context- the resolver for referenced elements, notnull- Returns:
- a Jackson
ObjectNode, nevernull
-