Ignore the 2nd patch set; sorry about that.

So, Thomas, I took your suggestion from the issue tracker and am
assuming the 1st value of acceptable values--but only if the user has
not already set an explicit value.

I think this is an acceptable compromise. It keeps the existing behavior
of "setValue(null)" adding an entry if needed (added a test for that).

Ironically, 3 of the 4 existing ValueListBoxTest test methods were
failing for the same mistake from the bug report--the tests didn't think
"null" was going to show up as an extra value. If our own unit test got
confused, I think that is a good hint that the "call setValue before
calling setAcceptableValues" convention of the current implementation is
less than ideal.

I should add an assertion that the 1st value gets picked, and probably
some javadocs...but other than that, what do you think, Thomas?


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

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

Reply via email to