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 JsFunctionBuilds theJsFunctionthat yields this input's value when called.
-
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
-
toJs
Description copied from class:Action.InputBuilds theJsFunctionthat yields this input's value when called. The function may takeeventas a runtime argument (declared by the subclass viaJsFunction.withArguments(String...)); inputs that don't needeventsimply omit the declaration and ignore the argument the caller passes.- Specified by:
toJsin classAction.Input<T>- Parameters:
trigger- the surrounding trigger this render is for, notnull- Returns:
- the input's JS function, not
null
-