Ashwin,

He said ListBox, not CellList.

Jose,

Two options:

(1) Add a ChangeHandler to track changes as they happen; return the
list as needed:

http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/gwt/user/client/ui/ListBox.html#addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler)

(2) Iterate through the list, calling this method for each item:

http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/gwt/user/client/ui/ListBox.html#isItemSelected(int)

On Jul 11, 7:12 am, "[email protected]"
<[email protected]> wrote:
> Associate a MultiSelectionModel with your list box. On the selection change
> event, you can do the following
>
> selectionModel.getSelectedSet();
>
> this would fetch you all selected items.
>
> Thanks
> Ashwin
>
> On Mon, Jul 11, 2011 at 6:09 PM, Jose Luis Hernandez <
>
>
>
> [email protected]> wrote:
> > Hello!
> > I'm trying to draw a ListBox with multiple selection. My problem is
> > when I want to collect the selected values from de ListBox. If I call
> > getItemText method I only obtain one value, but I would like to get
> > all selected values. How could I do it?
> > Thanks!
> > Nice day!
>
> > --
> > 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.

-- 
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.

Reply via email to