public interface HasHelper extends HasElement
Modifier and Type | Method and Description |
---|---|
default Component |
getHelperComponent()
Gets the component in the helper slot of this field.
|
default String |
getHelperText()
String used for the helper text.
|
default void |
setHelperComponent(Component component)
Adds the given component into helper slot of component, replacing any
existing helper component.
|
default void |
setHelperText(String helperText)
String used for the helper text.
|
getElement
default String getHelperText()
helperText
property from the web componentdefault void setHelperText(String helperText)
String used for the helper text. It shows a text adjacent to the field that can be used, e.g., to inform to the users which values it expects. Example: a text "The password must contain numbers" for the PasswordField.
In case both setHelperText(String)
and
setHelperComponent(Component)
are used, only the element defined
by setHelperComponent(Component)
will be visible, regardless of
the order on which they are defined.
helperText
- the String value to setdefault void setHelperComponent(Component component)
component
- the component to set, can be null
to remove existing
helper componentsetHelperText(String)
default Component getHelperComponent()
null
if no helper
component has been setsetHelperComponent(Component)
Copyright © 2025. All rights reserved.