Class Input

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<Input,String>
com.vaadin.flow.component.AbstractSinglePropertyField<Input,String>
com.vaadin.flow.component.html.Input
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<Input>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<Input>, com.vaadin.flow.component.FocusNotifier<Input>, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasPlaceholder, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<Input,String>,String>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<Input,String>,String>, com.vaadin.flow.data.value.HasValueChangeMode, Serializable

@Tag("input") public class Input extends com.vaadin.flow.component.AbstractSinglePropertyField<Input,String> implements com.vaadin.flow.component.Focusable<Input>, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.data.value.HasValueChangeMode, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasPlaceholder
Component representing an <input> element.
Since:
1.0
Author:
Vaadin Ltd
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField

    com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue

    com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
  • Field Summary

    Fields inherited from interface com.vaadin.flow.data.value.HasValueChangeMode

    DEFAULT_CHANGE_TIMEOUT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new input without any specific type, with ON_CHANGE value change mode.
    Input(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
    Creates a new input without any specific type.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.component.InputMode
    Gets the InputMode of this input.
     
    Gets the type of this input.
    com.vaadin.flow.data.value.ValueChangeMode
     
    int
    The default value is HasValueChangeMode.DEFAULT_CHANGE_TIMEOUT.
    void
    setInputMode(com.vaadin.flow.component.InputMode inputMode)
    Sets the InputMode that hints at the type of virtual keyboard to display when the user interacts with the field on a mobile device.
    void
    setPlaceholder(String placeholder)
     
    void
    Sets the type of this input.
    void
    setValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
     
    void
    setValueChangeTimeout(int valueChangeTimeout)
     

    Methods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField

    getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEvent

    Methods inherited from class com.vaadin.flow.component.AbstractField

    addValueChangeListener, bindValue, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEquals

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.BlurNotifier

    addBlurListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.Focusable

    addFocusShortcut, blur, focus, focus, getTabIndex, setTabIndex

    Methods inherited from interface com.vaadin.flow.component.FocusNotifier

    addFocusListener

    Methods inherited from interface com.vaadin.flow.component.HasAriaLabel

    getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy, setAriaLabelledBy

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    bindEnabled, isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasPlaceholder

    bindPlaceholder

    Methods inherited from interface com.vaadin.flow.component.HasSize

    bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasValue

    clear, getOptionalValue

    Methods inherited from interface com.vaadin.flow.component.HasValueAndElement

    bindReadOnly, bindRequiredIndicatorVisible, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible
  • Constructor Details

    • Input

      public Input()
      Creates a new input without any specific type, with ON_CHANGE value change mode.
    • Input

      public Input(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
      Creates a new input without any specific type.
      Parameters:
      valueChangeMode - initial value change mode, or null to disable the value synchronization
      Since:
      2.0
  • Method Details

    • setPlaceholder

      public void setPlaceholder(String placeholder)
      Specified by:
      setPlaceholder in interface com.vaadin.flow.component.HasPlaceholder
    • getPlaceholder

      public String getPlaceholder()
      Specified by:
      getPlaceholder in interface com.vaadin.flow.component.HasPlaceholder
    • setType

      public void setType(String type)
      Sets the type of this input.
      Parameters:
      type - the type, not null
      See Also:
    • getType

      public String getType()
      Gets the type of this input.
      Returns:
      the input type, by default "text"
    • setInputMode

      public void setInputMode(com.vaadin.flow.component.InputMode inputMode)
      Sets the InputMode that hints at the type of virtual keyboard to display when the user interacts with the field on a mobile device. If not set, the browser defaults to InputMode.TEXT.
      Parameters:
      inputMode - the inputmode value, or null to unset
      Since:
      25.3
      See Also:
    • getInputMode

      public com.vaadin.flow.component.InputMode getInputMode()
      Gets the InputMode of this input.
      Returns:
      the inputmode value, or null if not set
      Since:
      25.3
      See Also:
    • getValueChangeMode

      public com.vaadin.flow.data.value.ValueChangeMode getValueChangeMode()
      Specified by:
      getValueChangeMode in interface com.vaadin.flow.data.value.HasValueChangeMode
    • setValueChangeMode

      public void setValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
      Specified by:
      setValueChangeMode in interface com.vaadin.flow.data.value.HasValueChangeMode
    • setValueChangeTimeout

      public void setValueChangeTimeout(int valueChangeTimeout)
      Specified by:
      setValueChangeTimeout in interface com.vaadin.flow.data.value.HasValueChangeMode
    • getValueChangeTimeout

      public int getValueChangeTimeout()
      The default value is HasValueChangeMode.DEFAULT_CHANGE_TIMEOUT.
      Specified by:
      getValueChangeTimeout in interface com.vaadin.flow.data.value.HasValueChangeMode
      Since:
      2.0