No, it's not possible to force a select box to open with JS. What you could do is use a SuggestBox instead.
On Sun, Jul 26, 2009 at 10:50 AM, woland<[email protected]> wrote: > > Hi, > > I have a ListBox and I would like to fetch the options from a database > just before the drop down pops up. > > I would like that the DropDown shows up, at the onSuccess of my > callback (and not right away). > > Is there a way to achieve this? > > > listbox.addMouseDownHandler(new MouseDownHandler() > { > public void onMouseDown(MouseDownEvent event) > { > AsyncCallback callback = new AsyncCallback<HashMap>() > { > public void onSuccess(HashMap res) > { > ArrayList options= (ArrayList) > res.get("VALUES"); > > for( Iterator iter = options.iterator(); > iter.hasNext > (); ) > { > String value = (Map) iter.next(); > listbox.addItem(optionDescr, > option); > } > > //Now the DropDown should > become visible > } > }; > > RemoteService.sendRequest(nameService, nameRequest, > request, > callback); > } > } > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
