-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I'm trying to execute the following code to restore the list's selection:
beanList.addItemToSelection(beanList.getItemAtIndex(this.selectedBeanListIndex));
This is not working for me. I would like to know at least if is it possible to set the listbox selection from the java source code?
Thank you
Gyo
I found the solution. I have to send an event to the listbox after setting up the selected index:
public void onCancel(Event evt){ Listbox beanList = (Listbox)this.getFellow("beanList"); beanList.setSelectedIndex(this.selectedBeanListIndex); Events.sendEvent(beanList, new Event(Events.ON_SELECT, evt.getTarget())); }
Asked: 2009-07-28 17:17:50 +0800
Seen: 180 times
Last updated: Jul 28 '09