@Generated(value={"Generator: com.vaadin.generator.ComponentGenerator#1.2-SNAPSHOT","WebComponent: Vaadin.ComboBoxElement#4.2.0-alpha4","Flow#1.2-SNAPSHOT"}) @Tag(value="vaadin-combo-box") @HtmlImport(value="frontend://bower_components/vaadin-combo-box/src/vaadin-combo-box.html") public abstract class GeneratedVaadinComboBox<R extends GeneratedVaadinComboBox<R,T>,T> extends AbstractSinglePropertyField<R,T> implements HasStyle, Focusable<R>
Description copied from corresponding location in WebComponent:
<vaadin-combo-box>
is a combo box element combining a dropdown list
with an input field for filtering the list of items. If you want to replace
the default input field with a custom implementation, you should use the <vaadin-combo-box-light>
element.
Items in the dropdown list must be provided as a list of String
values. Defining the items is done using the items
property, which
can be assigned with data-binding, using an attribute or directly with the
JavaScript property.
<vaadin-combo-box label="Fruit" items="[[data]]"> </vaadin-combo-box>
combobox.items = ['apple', 'orange', 'banana'];
When the selected value
is changed, a value-changed
event is
triggered.
This element can be used within an iron-form
.
<vaadin-combo-box>
supports using custom renderer callback function
for defining the content of <vaadin-combo-box-item>
.
The renderer function provides root
, comboBox
, model
arguments when applicable. Generate DOM content by using model
object
properties if needed, append it to the root
element and control the
state of the host element by accessing comboBox
. Before generating
new content, users are able to check if there is already content in
root
for reusing it.
<vaadin-combo-box id="combo-box"></vaadin-combo-box>
const comboBox = document.querySelector('#combo-box');comboBox.items =
[ 'label': 'Hydrogen', 'value': 'H'
]; comboBox.renderer = function(root,
comboBox, model) { root.innerHTML = model.index + ': ' + model.item.label +
' ' + '' + model.item.value + ''; };}
Renderer is called on the opening of the combo-box and each time the related
model is updated. DOM generated during the renderer call can be reused in the
next renderer call and will be provided with the root
argument. On
first call it will be empty.
Alternatively, the content of the <vaadin-combo-box-item>
can be
populated by using custom item template provided in the light DOM:
<vaadin-combo-box items='[{"label": "Hydrogen", "value": "H"}]'> <template> [[index]]: [[item.label]] <b>[[item.value]</b> </template> </vaadin-combo-box>
The following properties are available for item template bindings:
Property name | Type | Description |
---|---|---|
index |
Number | Index of the item in the items array |
item |
String or Object | The item reference |
selected |
Boolean | True when item is selected |
focused |
Boolean | True when item is focused |
In addition to assigning an array to the items property, you can
alternatively provide the <vaadin-combo-box>
data through the dataProvider
function property. The <vaadin-combo-box>
calls this function
lazily, only when it needs more data to be displayed.
See the
dataProvider
in the API reference below for the detailed data
provider arguments description, and the ?Lazy Loading? example on ?Basics?
page in the demos.
Note that when using function data providers, the total number of items needs to be set manually. The total number of items can be returned in the second argument of the data provider callback:
javascript comboBox.dataProvider = function(params, callback) var url
= 'https://api.example/data' + '?page=' + params.page + // the requested page
index '&per_page=' + params.pageSize; // number of items on the page var
xhr = new XMLHttpRequest(); xhr.onload = function() { var response =
JSON.parse(xhr.responseText); callback( response.employees, // requested page
of items response.totalSize // total number of items ); }; xhr.open('GET',
url, true); xhr.send();
;}
The following custom properties are available for styling:
Custom property | Description | Default |
---|---|---|
--vaadin-combo-box-overlay-max-height |
Property that determines the max height of overlay | 65vh |
The following shadow DOM parts are available for styling:
Part name | Description |
---|---|
text-field |
The text field |
clear-button |
The clear button |
toggle-button |
The toggle button |
See <vaadin-overlay>
documentation for
<vaadin-combo-box-overlay>
parts.
See <vaadin-text-field>
documentation for the text field parts.
The following state attributes are available for styling:
Attribute | Description | Part name |
---|---|---|
opened |
Set when the combo box dropdown is open | :host |
disabled |
Set to a disabled combo box | :host |
readonly |
Set to a read only combo box | :host |
has-value |
Set when the element has a value | :host |
invalid |
Set when the element is invalid | :host |
focused |
Set when the element is focused | :host |
focus-ring |
Set when the element is keyboard focused | :host |
loading |
Set when new items are expected | :host |
In addition to <vaadin-combo-box>
itself, the following internal
components are themable:
<vaadin-text-field>
<vaadin-combo-box-overlay>
<vaadin-combo-box-item>
Note: the theme
attribute value set on <vaadin-combo-box>
is
propagated to the internal themable components listed above.
Modifier and Type | Class and Description |
---|---|
static class |
GeneratedVaadinComboBox.CustomValueSetEvent<R extends GeneratedVaadinComboBox<R,?>> |
static class |
GeneratedVaadinComboBox.FilterChangeEvent<R extends GeneratedVaadinComboBox<R,?>> |
static class |
GeneratedVaadinComboBox.InvalidChangeEvent<R extends GeneratedVaadinComboBox<R,?>> |
static class |
GeneratedVaadinComboBox.OpenedChangeEvent<R extends GeneratedVaadinComboBox<R,?>> |
static class |
GeneratedVaadinComboBox.SelectedItemChangeEvent<R extends GeneratedVaadinComboBox<R,?>> |
AbstractField.ComponentValueChangeEvent<C extends Component,V>
BlurNotifier.BlurEvent<C extends Component>
FocusNotifier.FocusEvent<C extends Component>
HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>>
Constructor and Description |
---|
GeneratedVaadinComboBox()
Default constructor.
|
GeneratedVaadinComboBox(T initialValue,
T defaultValue,
boolean acceptNullValues)
Constructs a new GeneratedVaadinComboBox component with the given
arguments.
|
GeneratedVaadinComboBox(T initialValue,
T defaultValue,
Class<P> elementPropertyType,
SerializableBiFunction<R,P,T> presentationToModel,
SerializableBiFunction<R,T,P> modelToPresentation)
Constructs a new GeneratedVaadinComboBox component with the given
arguments.
|
GeneratedVaadinComboBox(T initialValue,
T defaultValue,
Class<P> elementPropertyType,
SerializableFunction<P,T> presentationToModel,
SerializableFunction<T,P> modelToPresentation)
Constructs a new GeneratedVaadinComboBox component with the given
arguments.
|
Modifier and Type | Method and Description |
---|---|
protected Registration |
addCustomValueSetListener(ComponentEventListener<GeneratedVaadinComboBox.CustomValueSetEvent<R>> listener)
Adds a listener for
custom-value-set events fired by the
webcomponent. |
protected Registration |
addFilterChangeListener(ComponentEventListener<GeneratedVaadinComboBox.FilterChangeEvent<R>> listener)
Adds a listener for
filter-changed events fired by the
webcomponent. |
protected Registration |
addInvalidChangeListener(ComponentEventListener<GeneratedVaadinComboBox.InvalidChangeEvent<R>> listener)
Adds a listener for
invalid-changed events fired by the
webcomponent. |
protected Registration |
addOpenedChangeListener(ComponentEventListener<GeneratedVaadinComboBox.OpenedChangeEvent<R>> listener)
Adds a listener for
opened-changed events fired by the
webcomponent. |
protected Registration |
addSelectedItemChangeListener(ComponentEventListener<GeneratedVaadinComboBox.SelectedItemChangeEvent<R>> listener)
Adds a listener for
selected-item-changed events fired by the
webcomponent. |
protected void |
addToPrefix(Component... components)
Adds the given components as children of this component at the slot
'prefix'.
|
protected void |
cancel()
Description copied from corresponding location in WebComponent:
|
protected void |
checkValidity()
Description copied from corresponding location in WebComponent:
|
protected void |
clearCache()
Description copied from corresponding location in WebComponent:
|
protected void |
close()
Description copied from corresponding location in WebComponent:
|
protected String |
getErrorMessageString()
Description copied from corresponding location in WebComponent:
|
protected elemental.json.JsonArray |
getFilteredItemsJsonArray()
Description copied from corresponding location in WebComponent:
|
protected String |
getFilterString()
Description copied from corresponding location in WebComponent:
|
protected String |
getItemIdPathString()
Description copied from corresponding location in WebComponent:
|
protected String |
getItemLabelPathString()
Description copied from corresponding location in WebComponent:
|
protected elemental.json.JsonArray |
getItemsJsonArray()
Description copied from corresponding location in WebComponent:
|
protected String |
getItemValuePathString()
Description copied from corresponding location in WebComponent:
|
protected String |
getLabelString()
Description copied from corresponding location in WebComponent:
|
protected String |
getNameString()
Description copied from corresponding location in WebComponent:
|
protected double |
getPageSizeDouble()
Description copied from corresponding location in WebComponent:
|
protected String |
getPatternString()
Description copied from corresponding location in WebComponent:
|
protected String |
getPlaceholderString()
Description copied from corresponding location in WebComponent:
|
protected elemental.json.JsonObject |
getSelectedItemJsonObject()
Description copied from corresponding location in WebComponent:
|
protected double |
getSizeDouble()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isAllowCustomValueBoolean()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isAutofocusBoolean()
This property is not synchronized automatically from the client side, so
the returned value may not be the same as in client side.
|
protected boolean |
isDisabledBoolean()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isInvalidBoolean()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isLoadingBoolean()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isOpenedBoolean()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isPreventInvalidInputBoolean()
Description copied from corresponding location in WebComponent:
|
protected boolean |
isReadonlyBoolean()
This property is not synchronized automatically from the client side, so
the returned value may not be the same as in client side.
|
protected boolean |
isRequiredBoolean()
Description copied from corresponding location in WebComponent:
|
protected void |
open()
Description copied from corresponding location in WebComponent:
|
protected void |
remove(Component... components)
Removes the given child components from this component.
|
protected void |
removeAll()
Removes all contents from this component, this includes child components,
text content as well as child elements that have been added directly to
this component using the
Element API. |
protected void |
render()
Description copied from corresponding location in WebComponent:
|
protected void |
setAllowCustomValue(boolean allowCustomValue)
Description copied from corresponding location in WebComponent:
|
protected void |
setAutofocus(boolean autofocus) |
protected void |
setDisabled(boolean disabled)
Description copied from corresponding location in WebComponent:
|
protected void |
setErrorMessage(String errorMessage)
Description copied from corresponding location in WebComponent:
|
protected void |
setFilter(String filter)
Description copied from corresponding location in WebComponent:
|
protected void |
setFilteredItems(elemental.json.JsonArray filteredItems)
Description copied from corresponding location in WebComponent:
|
protected void |
setInvalid(boolean invalid)
Description copied from corresponding location in WebComponent:
|
protected void |
setItemIdPath(String itemIdPath)
Description copied from corresponding location in WebComponent:
|
protected void |
setItemLabelPath(String itemLabelPath)
Description copied from corresponding location in WebComponent:
|
protected void |
setItems(elemental.json.JsonArray items)
Description copied from corresponding location in WebComponent:
|
protected void |
setItemValuePath(String itemValuePath)
Description copied from corresponding location in WebComponent:
|
protected void |
setLabel(String label)
Description copied from corresponding location in WebComponent:
|
protected void |
setLoading(boolean loading)
Description copied from corresponding location in WebComponent:
|
protected void |
setName(String name)
Description copied from corresponding location in WebComponent:
|
protected void |
setOpened(boolean opened)
Description copied from corresponding location in WebComponent:
|
protected void |
setPageSize(double pageSize)
Description copied from corresponding location in WebComponent:
|
protected void |
setPattern(String pattern)
Description copied from corresponding location in WebComponent:
|
protected void |
setPlaceholder(String placeholder)
Description copied from corresponding location in WebComponent:
|
protected void |
setPreventInvalidInput(boolean preventInvalidInput)
Description copied from corresponding location in WebComponent:
|
protected void |
setReadonly(boolean readonly) |
protected void |
setRequired(boolean required)
Description copied from corresponding location in WebComponent:
|
protected void |
setSelectedItem(elemental.json.JsonObject selectedItem)
Description copied from corresponding location in WebComponent:
|
protected void |
setSize(double size)
Description copied from corresponding location in WebComponent:
|
protected void |
validate()
Description copied from corresponding location in WebComponent:
|
hasValidValue, setPresentationValue, setSynchronizedEvent
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEquals
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
blur, focus, getTabIndex, setTabIndex
addBlurListener
addFocusListener
isEnabled, setEnabled
getElement
isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible
clear, getOptionalValue
addAttachListener
addDetachListener
public GeneratedVaadinComboBox(T initialValue, T defaultValue, Class<P> elementPropertyType, SerializableFunction<P,T> presentationToModel, SerializableFunction<T,P> modelToPresentation)
P
- the property typeinitialValue
- the initial value to set to the valuedefaultValue
- the default value to use if the value isn't definedelementPropertyType
- the type of the element propertypresentationToModel
- a function that converts a string value to a model valuemodelToPresentation
- a function that converts a model value to a string valuepublic GeneratedVaadinComboBox(T initialValue, T defaultValue, boolean acceptNullValues)
initialValue
- the initial value to set to the valuedefaultValue
- the default value to use if the value isn't definedacceptNullValues
- whether null
is accepted as a model valuepublic GeneratedVaadinComboBox(T initialValue, T defaultValue, Class<P> elementPropertyType, SerializableBiFunction<R,P,T> presentationToModel, SerializableBiFunction<R,T,P> modelToPresentation)
P
- the property typeinitialValue
- the initial value to set to the valuedefaultValue
- the default value to use if the value isn't definedelementPropertyType
- the type of the element propertypresentationToModel
- a function that accepts this component and a property value
and returns a model valuemodelToPresentation
- a function that accepts this component and a model value and
returns a property valuepublic GeneratedVaadinComboBox()
protected boolean isAutofocusBoolean()
autofocus
property from the webcomponentprotected void setAutofocus(boolean autofocus)
autofocus
- the boolean value to setprotected boolean isDisabledBoolean()
Description copied from corresponding location in WebComponent:
Set to true to disable this input.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
disabled
property from the webcomponentprotected void setDisabled(boolean disabled)
Description copied from corresponding location in WebComponent:
Set to true to disable this input.
disabled
- the boolean value to setprotected double getPageSizeDouble()
Description copied from corresponding location in WebComponent:
Number of items fetched at a time from the dataprovider.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
pageSize
property from the webcomponentprotected void setPageSize(double pageSize)
Description copied from corresponding location in WebComponent:
Number of items fetched at a time from the dataprovider.
pageSize
- the double value to setprotected double getSizeDouble()
Description copied from corresponding location in WebComponent:
Total number of items.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
size
property from the webcomponentprotected void setSize(double size)
Description copied from corresponding location in WebComponent:
Total number of items.
size
- the double value to set@Synchronize(property="opened", value="opened-changed") protected boolean isOpenedBoolean()
Description copied from corresponding location in WebComponent:
True if the dropdown is open, false otherwise.
This property is synchronized automatically from client side when a 'opened-changed' event happens.
opened
property from the webcomponentprotected void setOpened(boolean opened)
Description copied from corresponding location in WebComponent:
True if the dropdown is open, false otherwise.
opened
- the boolean value to setprotected boolean isReadonlyBoolean()
readonly
property from the webcomponentprotected void setReadonly(boolean readonly)
readonly
- the boolean value to setprotected elemental.json.JsonArray getItemsJsonArray()
Description copied from corresponding location in WebComponent:
A full set of items to filter the visible options from. The items can be
of either String
or Object
type.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
items
property from the webcomponentprotected void setItems(elemental.json.JsonArray items)
Description copied from corresponding location in WebComponent:
A full set of items to filter the visible options from. The items can be
of either String
or Object
type.
items
- the JsonArray value to setprotected boolean isAllowCustomValueBoolean()
Description copied from corresponding location in WebComponent:
If true
, the user can input a value that is not present in the
items list. value
property will be set to the input value in this
case. Also, when value
is set programmatically, the input value
will be set to reflect that value.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
allowCustomValue
property from the webcomponentprotected void setAllowCustomValue(boolean allowCustomValue)
Description copied from corresponding location in WebComponent:
If true
, the user can input a value that is not present in the
items list. value
property will be set to the input value in this
case. Also, when value
is set programmatically, the input value
will be set to reflect that value.
allowCustomValue
- the boolean value to setprotected elemental.json.JsonArray getFilteredItemsJsonArray()
Description copied from corresponding location in WebComponent:
A subset of items, filtered based on the user input. Filtered items can
be assigned directly to omit the internal filtering functionality. The
items can be of either String
or Object
type.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
filteredItems
property from the webcomponentprotected void setFilteredItems(elemental.json.JsonArray filteredItems)
Description copied from corresponding location in WebComponent:
A subset of items, filtered based on the user input. Filtered items can
be assigned directly to omit the internal filtering functionality. The
items can be of either String
or Object
type.
filteredItems
- the JsonArray value to setprotected boolean isLoadingBoolean()
Description copied from corresponding location in WebComponent:
When set to true
, "loading" attribute is added to host
and the overlay element.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
loading
property from the webcomponentprotected void setLoading(boolean loading)
Description copied from corresponding location in WebComponent:
When set to true
, "loading" attribute is added to host
and the overlay element.
loading
- the boolean value to set@Synchronize(property="filter", value="filter-changed") protected String getFilterString()
Description copied from corresponding location in WebComponent:
Filtering string the user has typed into the input field.
This property is synchronized automatically from client side when a 'filter-changed' event happens.
filter
property from the webcomponentprotected void setFilter(String filter)
Description copied from corresponding location in WebComponent:
Filtering string the user has typed into the input field.
filter
- the String value to set@Synchronize(property="selectedItem", value="selected-item-changed") protected elemental.json.JsonObject getSelectedItemJsonObject()
Description copied from corresponding location in WebComponent:
The selected item from the items
array.
This property is synchronized automatically from client side when a 'selected-item-changed' event happens.
selectedItem
property from the webcomponentprotected void setSelectedItem(elemental.json.JsonObject selectedItem)
Description copied from corresponding location in WebComponent:
The selected item from the items
array.
selectedItem
- the JsonObject value to setprotected String getItemLabelPathString()
Description copied from corresponding location in WebComponent:
Path for label of the item. If items
is an array of objects, the
itemLabelPath
is used to fetch the displayed string label for
each item.
The item label is also used for matching items when processing user input, i.e., for filtering and selecting items.
When using item templates, the property is still needed because it is used for filtering, and for displaying the selected item value in the input box.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
itemLabelPath
property from the webcomponentprotected void setItemLabelPath(String itemLabelPath)
Description copied from corresponding location in WebComponent:
Path for label of the item. If items
is an array of objects, the
itemLabelPath
is used to fetch the displayed string label for
each item.
The item label is also used for matching items when processing user input, i.e., for filtering and selecting items.
When using item templates, the property is still needed because it is used for filtering, and for displaying the selected item value in the input box.
itemLabelPath
- the String value to setprotected String getItemValuePathString()
Description copied from corresponding location in WebComponent:
Path for the value of the item. If items
is an array of objects,
the itemValuePath:
is used to fetch the string value for the
selected item.
The item value is used in the value
property of the combo box, to
provide the form value.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
itemValuePath
property from the webcomponentprotected void setItemValuePath(String itemValuePath)
Description copied from corresponding location in WebComponent:
Path for the value of the item. If items
is an array of objects,
the itemValuePath:
is used to fetch the string value for the
selected item.
The item value is used in the value
property of the combo box, to
provide the form value.
itemValuePath
- the String value to setprotected String getItemIdPathString()
Description copied from corresponding location in WebComponent:
Path for the id of the item. If items
is an array of objects, the
itemIdPath
is used to compare and identify the same item in
selectedItem
and filteredItems
(items given by the
dataProvider
callback).
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
itemIdPath
property from the webcomponentprotected void setItemIdPath(String itemIdPath)
Description copied from corresponding location in WebComponent:
Path for the id of the item. If items
is an array of objects, the
itemIdPath
is used to compare and identify the same item in
selectedItem
and filteredItems
(items given by the
dataProvider
callback).
itemIdPath
- the String value to setprotected String getNameString()
Description copied from corresponding location in WebComponent:
The name of this element.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
name
property from the webcomponentprotected void setName(String name)
Description copied from corresponding location in WebComponent:
The name of this element.
name
- the String value to set@Synchronize(property="invalid", value="invalid-changed") protected boolean isInvalidBoolean()
Description copied from corresponding location in WebComponent:
Set to true if the value is invalid.
This property is synchronized automatically from client side when a 'invalid-changed' event happens.
invalid
property from the webcomponentprotected void setInvalid(boolean invalid)
Description copied from corresponding location in WebComponent:
Set to true if the value is invalid.
invalid
- the boolean value to setprotected String getLabelString()
Description copied from corresponding location in WebComponent:
The label for this element.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
label
property from the webcomponentprotected void setLabel(String label)
Description copied from corresponding location in WebComponent:
The label for this element.
label
- the String value to setprotected boolean isRequiredBoolean()
Description copied from corresponding location in WebComponent:
Set to true to mark the input as required.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
required
property from the webcomponentprotected void setRequired(boolean required)
Description copied from corresponding location in WebComponent:
Set to true to mark the input as required.
required
- the boolean value to setprotected boolean isPreventInvalidInputBoolean()
Description copied from corresponding location in WebComponent:
Set to true to prevent the user from entering invalid input.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
preventInvalidInput
property from the webcomponentprotected void setPreventInvalidInput(boolean preventInvalidInput)
Description copied from corresponding location in WebComponent:
Set to true to prevent the user from entering invalid input.
preventInvalidInput
- the boolean value to setprotected String getPatternString()
Description copied from corresponding location in WebComponent:
A pattern to validate the input
with.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
pattern
property from the webcomponentprotected void setPattern(String pattern)
Description copied from corresponding location in WebComponent:
A pattern to validate the input
with.
pattern
- the String value to setprotected String getErrorMessageString()
Description copied from corresponding location in WebComponent:
The error message to display when the input is invalid.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
errorMessage
property from the webcomponentprotected void setErrorMessage(String errorMessage)
Description copied from corresponding location in WebComponent:
The error message to display when the input is invalid.
errorMessage
- the String value to setprotected String getPlaceholderString()
Description copied from corresponding location in WebComponent:
A placeholder string in addition to the label.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
placeholder
property from the webcomponentprotected void setPlaceholder(String placeholder)
Description copied from corresponding location in WebComponent:
A placeholder string in addition to the label.
placeholder
- the String value to setprotected void clearCache()
Description copied from corresponding location in WebComponent:
Clears the cached pages and reloads data from dataprovider when needed.
protected void render()
Description copied from corresponding location in WebComponent:
Manually invoke existing renderer.
protected void open()
Description copied from corresponding location in WebComponent:
Opens the dropdown list.
protected void close()
Description copied from corresponding location in WebComponent:
Closes the dropdown list.
protected void cancel()
Description copied from corresponding location in WebComponent:
Reverts back to original value.
@NotSupported protected void validate()
Description copied from corresponding location in WebComponent:
Returns true if value
is valid, and sets the invalid
flag
appropriately.
This function is not supported by Flow because it returns a
boolean
. Functions with return types different than void are
not supported at this moment.
protected void checkValidity()
Description copied from corresponding location in WebComponent:
Returns true if the current input value satisfies all constraints (if any)
You can override the checkValidity
method for custom validations.
protected Registration addCustomValueSetListener(ComponentEventListener<GeneratedVaadinComboBox.CustomValueSetEvent<R>> listener)
custom-value-set
events fired by the
webcomponent.listener
- the listenerRegistration
for removing the event listenerprotected Registration addSelectedItemChangeListener(ComponentEventListener<GeneratedVaadinComboBox.SelectedItemChangeEvent<R>> listener)
selected-item-changed
events fired by the
webcomponent.listener
- the listenerRegistration
for removing the event listenerprotected Registration addOpenedChangeListener(ComponentEventListener<GeneratedVaadinComboBox.OpenedChangeEvent<R>> listener)
opened-changed
events fired by the
webcomponent.listener
- the listenerRegistration
for removing the event listenerprotected Registration addFilterChangeListener(ComponentEventListener<GeneratedVaadinComboBox.FilterChangeEvent<R>> listener)
filter-changed
events fired by the
webcomponent.listener
- the listenerRegistration
for removing the event listenerprotected Registration addInvalidChangeListener(ComponentEventListener<GeneratedVaadinComboBox.InvalidChangeEvent<R>> listener)
invalid-changed
events fired by the
webcomponent.listener
- the listenerRegistration
for removing the event listenerprotected void addToPrefix(Component... components)
components
- The components to add.protected void remove(Component... components)
components
- The components to remove.IllegalArgumentException
- if any of the components is not a child of this component.protected void removeAll()
Element
API.Copyright © 2018. All rights reserved.