ListBox problem

0 views
Skip to first unread message

RickArrano

unread,
Aug 2, 2010, 7:28:11 AM8/2/10
to gwt-mosaic
Hello,
I've got a problem with a ListBox: when I have a ListBox in a
VerticalPanel(in a LayoutPanel) in a tab, I want to add items
according to some JSON queries to the server. I initialize it with a
few entries, but it's only able to handle as many items as it starts
out with. Adding extra entries does no good - I can see that the data
is inserted through Firebug, but the panel does not expand along with
the ListBox(and it looks like the ListBox doesn't actually expand
either). Any ideas on how to solve this?

Thanks,
Rick

ctasada

unread,
Aug 8, 2010, 12:35:39 PM8/8/10
to gwt-mosaic
Hi Rick,

without seeing the code is quite hard. Just a wild guest, are you
adding the elements to the ListBox or the model?

You can get the model like

final DefaultListModel<String> model = (DefaultListModel<String>)
listBox.getModel();

and then simply add your elements to the model. Everything else should
be transparent to you.
Reply all
Reply to author
Forward
0 new messages