diff options
Diffstat (limited to 'src/com/vaadin/terminal')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VListSelect.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java index e19079039d..46211bafe5 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java @@ -51,7 +51,9 @@ public class VListSelect extends VOptionGroupBase { select.addItem(optionUidl.getStringAttribute("caption"), optionUidl.getStringAttribute("key")); if (optionUidl.hasAttribute("selected")) { - select.setItemSelected(select.getItemCount() - 1, true); + int itemIndex = select.getItemCount() - 1; + select.setItemSelected(itemIndex, true); + lastSelectedIndex = itemIndex; } } if (getRows() > 0) { |