Overview
HasValueElement is a mixin interface for Vaadin components that expose a textual value through an input slot. This interface provides methods to get, set, clear, and assert input values.
Methods
getInputLocator
slot="input" attribute
getValue
setValue
The value to set in the input field
clear
assertValue
The expected value to assert against
Implementation Details
This interface extendsHasLocatorElement and provides default implementations for all methods. The value operations work on the input slot element, which is located using *[slot="input"].
The setValue() method not only fills the input but also dispatches a change event to ensure that client-side listeners are triggered.
Implementing Classes
This interface is implemented throughHasInputFieldElement, which is used by:
TextFieldElement(and its subclasses likeEmailFieldElement,PasswordFieldElement, etc.)AbstractNumberFieldElement(and its subclasses likeIntegerFieldElement,NumberFieldElement)BigDecimalFieldElementComboBoxElementMultiSelectComboBoxElementSelectElementDatePickerElementDateTimePickerElementTimePickerElement
Usage Example
See Also
- HasInputFieldElement - Convenience interface that includes HasValueElement
- TextFieldElement - Example implementation