com.vaadin.client.connectors.
Interface AbstractMultiSelectConnector.MultiSelectWidget
-
All Known Implementing Classes:
Enclosing class:
public static interface AbstractMultiSelectConnector.MultiSelectWidget
Abstraction layer to help populate different multiselect widgets based on same JSON data.
-
-
Method Summary
All Methods Modifier and Type Method Description Registration
addSelectionChangeListener(BiConsumer<Set<String>,Set<String>> selectionChangeListener)
Adds a selection change listener the select.
static String
getCaption(elemental.json.JsonObject item)
Returns the caption for the given item.
static Optional<String>
getIconUrl(elemental.json.JsonObject item)
Returns the optional icon URL for the given item.
static String
getKey(elemental.json.JsonObject item)
Returns the key for the given item.
static boolean
isEnabled(elemental.json.JsonObject item)
Returns whether the given item is enabled or not.
static boolean
isSelected(elemental.json.JsonObject item)
Returns whether this item is selected or not.
void
setItems(List<elemental.json.JsonObject> items)
Sets the given items to the select.
-
-
-
Method Detail
-
setItems
void setItems(List<elemental.json.JsonObject> items)
Sets the given items to the select.
Parameters:
items
- the items for the select
-
addSelectionChangeListener
Registration addSelectionChangeListener(BiConsumer<Set<String>,Set<String>> selectionChangeListener)
Adds a selection change listener the select.
Parameters:
selectionChangeListener
- the listener to add, notnull
Returns:
a registration handle to remove the listener
-
getCaption
static String getCaption(elemental.json.JsonObject item)
Returns the caption for the given item.
Parameters:
item
- the item, notnull
Returns:
caption of the item
-
getKey
static String getKey(elemental.json.JsonObject item)
Returns the key for the given item.
Parameters:
item
- the item, notnull
Returns:
key of the item
-
isEnabled
static boolean isEnabled(elemental.json.JsonObject item)
Returns whether the given item is enabled or not.
Disabling items is not supported by all multiselects.
Parameters:
item
- the item, notnull
Returns:
true
enabled,false
if not
-
isSelected
static boolean isSelected(elemental.json.JsonObject item)
Returns whether this item is selected or not.
Parameters:
item
- the item, notnull
Returns:
true
is selected,false
if not
-
-