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

public class PropertyInput<T> extends Action.Input<T>
Reads a JavaScript property from a target component's root element at the moment a trigger fires.

Common targets and properties:

  • TextField.valuenew PropertyInput<>(textField, "value", String.class)
  • Checkbox.checkednew PropertyInput<>(checkbox, "checked", Boolean.class)

For internal use only. May be renamed or removed in a future release.

See Also:
  • Constructor Details

    • PropertyInput

      public PropertyInput(Component target, String propertyName, Class<T> valueType)
      Creates a property input that reads the given JS property from the given target component.
      Parameters:
      target - the component to read from, not null
      propertyName - the JS property name, not null
      valueType - runtime type of the produced value, not null
  • Method Details

    • appendExpression

      protected void appendExpression(com.vaadin.flow.component.trigger.internal.JsBuilder builder, StringBuilder out)
      Description copied from class: Action.Input
      Appends this input's JS expression to out. Element references must go through JsBuilder.reference(com.vaadin.flow.dom.Element).
      Specified by:
      appendExpression in class Action.Input<T>
      Parameters:
      builder - collects element parameter references, not null
      out - buffer to append into, not null