From: Marc Englund Date: Mon, 23 Apr 2007 10:54:30 +0000 (+0000) Subject: LazyLoading Select fixes: (java) did not honor itemCaptionProperty, (theme) did not... X-Git-Tag: 6.7.0.beta1~6426 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f4f2577edd820a76ca31ba9b6d72db6cc41928b1;p=vaadin-framework.git LazyLoading Select fixes: (java) did not honor itemCaptionProperty, (theme) did not render empty option caption properly. svn changeset:1298/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/ui/Select.java b/src/com/itmill/toolkit/ui/Select.java index 2070153d5b..6411d76822 100644 --- a/src/com/itmill/toolkit/ui/Select.java +++ b/src/com/itmill/toolkit/ui/Select.java @@ -345,8 +345,9 @@ public class Select extends AbstractField implements Container, target .addAttribute("initial", optionsStream.getJSON(20, 0, "")); - target.addAttribute("selectedValue", toString() == null ? "" - : toString()); + String caption = getItemCaption(getValue()); + target.addAttribute("selectedValue", caption == null ? "" + : caption); } } target.endTag("options");