diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2017-01-05 18:09:32 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2017-01-05 18:09:32 +0200 |
commit | 4130f1d87d6ab387a363a4e44e8746eddc049d13 (patch) | |
tree | 0a6cb8b997f95c710dbac269bfba3615eb74df6a /documentation/components/components-listselect.asciidoc | |
parent | 11f10b827e92ed7c07d6584a181f7f1374e8109b (diff) | |
download | vaadin-framework-4130f1d87d6ab387a363a4e44e8746eddc049d13.tar.gz vaadin-framework-4130f1d87d6ab387a363a4e44e8746eddc049d13.zip |
Update component docs for 8 except Grid
Diffstat (limited to 'documentation/components/components-listselect.asciidoc')
-rw-r--r-- | documentation/components/components-listselect.asciidoc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/documentation/components/components-listselect.asciidoc b/documentation/components/components-listselect.asciidoc index 88343ee606..4573f77c97 100644 --- a/documentation/components/components-listselect.asciidoc +++ b/documentation/components/components-listselect.asciidoc @@ -14,9 +14,7 @@ endif::web[] The [classname]#ListSelect# component is list box that shows the selectable items in a vertical list. If the number of items exceeds the height of the -component, a scrollbar is shown. The component allows both single and multiple -selection modes, which you can set with [methodname]#setMultiSelect()#. It is -visually identical in both modes. +component, a scrollbar is shown. The component allows selecting multiple values. [source, java] @@ -29,6 +27,11 @@ select.setItems("Mercury", "Venus", "Earth", ...); // Show 5 items and a scrollbar if there are more select.setRows(5); + +select.addValueChangeListener(event -> { + Set<String> selected = event.getNewSelection(); + Notification.show(selected.size() + " items."); +}); ---- The number of visible items is set with [methodname]#setRows()#. |