Having an issue with ValueListBox in GWT 2.1. I'm probably just doing
something wrong! I build a ValueListBox:
storeListBox = new ValueListBox<Stores>(new Renderer<Stores>() {
@Override
public String render(Stores object) {
return object.getStoreName();
}
@Override
public void render(Stores object, Appendable appendable)
throws IOException {
}
});
Then, later on to populate, I apply a list of Stores objects --
storeListBox.setAcceptableValues(app.getStoresList());
Everything if fine, except this -- I can see when I look at the Stores
list, it has 3 elements in the list. However, the render method is
getting invoked FOUR times, and the fourth time is getting null passed
in as the object. I can clearly see that there are only three
elements in the list and that the null invokation is after it has done
all the objects in the list.
I can condition the return on object not being null, but I need to
return something from the render method and that is getting added
erroneously to the ValueList.
What am I doing wrong?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.