-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
I would like setting the selectedIndex of my listbox at the page creation. I use a model for my listbox, and set it in the composer constructor, and set the selected index in doAfterCompose... But it doesn't work. The index is out of bound, so I don't know how I can do...
I suppose the listbox is not still rendered...
Here is the zul file part:
<listbox id="companyListbox" width="100px" model="@{composer.companyModel}" mold="select" > <listitem self="@{each=companyData}"> <listcell label="@{companyData.company.name}" /> </listitem> </listbox>
Or maybe because I bind the composer to the window in do afterCompose...
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); DataBinder binder = new AnnotateDataBinder(comp); binder.bindBean("composer", this); binder.loadAll(); }
Thanks for you help,
Regards,
SHERKHAN
Asked: 2010-07-23 04:10:20 +0800
Seen: 323 times
Last updated: Jul 26 '10