about gwt listbox

48 views
Skip to first unread message

vijay gohel

unread,
Jan 6, 2011, 1:13:41 AM1/6/11
to google-we...@googlegroups.com
hi all,

please check attached image

i want that kind of output

please help me to do in gwt listbix

--
Regards,
Vijay Gohel

listboxoutput.bmp

salk31

unread,
Jan 6, 2011, 10:33:20 AM1/6/11
to Google Web Toolkit
I don't think it supports that. This ticket
http://code.google.com/p/google-web-toolkit/issues/detail?id=1167
seems to back that up.

So guess only options are to choose a different widget, write your own
or use one of the libs that builds on core GWT.
>  listboxoutput.bmp
> 436KViewDownload

Thad

unread,
Jan 6, 2011, 12:58:04 PM1/6/11
to Google Web Toolkit
The code in this message worked for me in Firefox and IE, but not with
Safari 5:

http://groups.google.com/group/google-web-toolkit/msg/5c44460a11ad950b

I haven't looked into the whys of that, but if anyone figures out a
solution, I'd be interested. I had to settle for a kludge of multiple
list boxes and hide/show via radio buttons to get something out the
door on time.

On Jan 6, 10:33 am, salk31 <s...@redspr.com> wrote:
> I don't think it supports that. This tickethttp://code.google.com/p/google-web-toolkit/issues/detail?id=1167

Thomas Broyer

unread,
Jan 6, 2011, 6:38:21 PM1/6/11
to google-we...@googlegroups.com


On Thursday, January 6, 2011 6:58:04 PM UTC+1, Thad wrote:
The code in this message worked for me in Firefox and IE, but not with
Safari 5:

http://groups.google.com/group/google-web-toolkit/msg/5c44460a11ad950b

I haven't looked into the whys of that, but if anyone figures out a
solution, I'd be interested.

Thad

unread,
Jan 20, 2011, 5:46:15 PM1/20/11
to Google Web Toolkit
It's been awhile, but I finally had a chance to look at this. Yes,
Thomas, the problem is in DOMImplSafari's implementation of
selectGetOptions().

For my workaround, when I need an OPTGROUP, I use code I linked to
earlier. However, use the ListBox, I have to make some changes in
ListBox.getItemCount() and ListBox.getValue(int):

SelectElement select = listbox.getElement().cast();
int optCount = select.getElementsByTagName("option").getLength();
for (int i=0; i < optCount; i++) {
OptionElement option =
select.getElementsByTagName("option").getItem(i).cast();
}

This works in Safari 5, Firefox 3.6, and IE8/7/6 (IE6 tested with
IE8's Developer Tools and Quirks mode).
Reply all
Reply to author
Forward
0 new messages