Package com.vaadin.flow.component
Interface HasPlaceholder
- All Superinterfaces:
HasElement
,Serializable
- All Known Implementing Classes:
AbstractNumberField
,BigDecimalField
,ComboBox
,ComboBoxBase
,DatePicker
,EmailField
,Input
,IntegerField
,MultiSelectComboBox
,NumberField
,PasswordField
,Select
,TextArea
,TextField
,TextFieldBase
,TimePicker
A component which supports a placeholder.
A placeholder is a text that should be displayed in the input element, when the user has not entered a value.
The default implementations sets the placeholder
property for
this element. Override all methods in this interface if the placeholder
should be set in some other way.
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
The placeholder text that should be displayed in the input element, when the user has not entered a valuedefault void
setPlaceholder
(String placeholder) Sets the placeholder text that should be displayed in the input element, when the user has not entered a valueMethods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
setPlaceholder
Sets the placeholder text that should be displayed in the input element, when the user has not entered a value- Parameters:
placeholder
- the placeholder text, may be null.
-
getPlaceholder
The placeholder text that should be displayed in the input element, when the user has not entered a value- Returns:
- the
placeholder
property from the web component. May be null if not yet set.
-