-1

http://gwt-code-reviews.appspot.com/1619803/diff/1/user/src/com/google/gwt/user/client/ui/ValueListBox.java
File user/src/com/google/gwt/user/client/ui/ValueListBox.java (right):

http://gwt-code-reviews.appspot.com/1619803/diff/1/user/src/com/google/gwt/user/client/ui/ValueListBox.java#newcode153
user/src/com/google/gwt/user/client/ui/ValueListBox.java:153: if (value
== null) {
updateListBox is called in two cases:
 - when setting the list of acceptable values, to re-select the current
value in the list (possibly adding it to the list of acceptable values,
so it can be selected)
 - when setting the selected value, to add it to the list of acceptable
values, if needed, before selecting it.

The 'null' value shouldn't be special-cased, because you might want
'null' as an acceptable value. This check simply breaks setValue(null)
(adding a test would be great: set the value to any non-null value, then
set it back to null).

Actually, I'm not sure there's any issue with ValueListBox: you just
have to call setValue before setAcceptableValues to set the *default
value* (which, by default, is null). See my comment on the issue itself,
in which I propose solutions:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5477

And key providers and renderers should all gracefully handle a null
value IMO.

http://gwt-code-reviews.appspot.com/1619803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to