diff options
Diffstat (limited to 'documentation/components/components-twincolselect.asciidoc')
-rw-r--r-- | documentation/components/components-twincolselect.asciidoc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/documentation/components/components-twincolselect.asciidoc b/documentation/components/components-twincolselect.asciidoc index cf0ed36e37..b5306359cb 100644 --- a/documentation/components/components-twincolselect.asciidoc +++ b/documentation/components/components-twincolselect.asciidoc @@ -46,14 +46,13 @@ select.setItems("Mercury", "Venus", "Earth", "Mars", select.setRows(select.size()); // Preselect a few items -select.setSelection("Venus", "Earth", "Mars"); +select.select("Venus", "Earth", "Mars"); // Handle value changes -select.onSelect(selectedItems -> +select.addSelectionListener(event -> layout.addComponent( - new Label("Selected: " + selectedItems))); + new Label("Selected: " + event.getNewSelection()))); ---- -See the http://demo.vaadin.com/book-examples-vaadin7/book#component.select.twincolselect.captions[on-line example, window="_blank"]. The resulting component is shown in <<figure.components.twincolselect.basic>>. |