Class PropertyInput<T>
java.lang.Object
com.vaadin.flow.component.trigger.internal.Action.Input<T>
com.vaadin.flow.component.trigger.internal.PropertyInput<T>
- Type Parameters:
T- the runtime type of the value produced
- All Implemented Interfaces:
Serializable
Reads a JavaScript property from a target component's root element at the
moment a trigger fires.
Common targets and properties:
TextField.value→new PropertyInput<>(textField, "value", String.class)Checkbox.checked→new PropertyInput<>(checkbox, "checked", Boolean.class)
For internal use only. May be renamed or removed in a future release.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyInput(Component target, String propertyName, Class<T> valueType) Creates a property input that reads the given JS property from the given target component. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendExpression(com.vaadin.flow.component.trigger.internal.JsBuilder builder, StringBuilder out) Appends this input's JS expression toout.
-
Constructor Details
-
PropertyInput
Creates a property input that reads the given JS property from the given target component.- Parameters:
target- the component to read from, notnullpropertyName- the JS property name, notnullvalueType- runtime type of the produced value, notnull
-
-
Method Details
-
appendExpression
protected void appendExpression(com.vaadin.flow.component.trigger.internal.JsBuilder builder, StringBuilder out) Description copied from class:Action.InputAppends this input's JS expression toout. Element references must go throughJsBuilder.reference(com.vaadin.flow.dom.Element).- Specified by:
appendExpressionin classAction.Input<T>- Parameters:
builder- collects element parameter references, notnullout- buffer to append into, notnull
-