-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4405972
By: rmaugusto
Im using zk 2.4.1 and my zul is:
<a:bind model="classificacoesCliente"
selectedItem="clienteBean.TClassificacaoCliente" /> <listbox id="cmb_classificacao" mold="select" rows="1" >
<a:bind _var="objClassificacao"/>
<listitem label="@{objClassificacao.nome}" value="@{objClassificacao}"
/>
</listbox>
The itens are shown correctly, but in java when I try to read them:
for (int i=0;i<lst.getChildren().size();i++) {
Listitem lstItem = (Listitem)lst.getChildren().get(i);
System.out.println( lstItem.getLabel() + " - " + lstItem.getValue() ); }
The Label is empty and the value is null.
I tried:
<a:bind _var="objClassificacao" label="objClassificacao.nome"
value="objClassificacao" />
<listitem />
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4406970
By: jebberwocky
Dear Rick
In which method u use the for-loop?
Thank you
/jeff
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4407642
By: rmaugusto
Right after windowBinder.loadAll() in the onCreate()
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4411513
By: rmaugusto
Did you got this error ?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4414280
By: henrichen
The DataBinder helps you setup the "model" property of the cmb_classificacao Listbox and that is all.
The "label" and "value" is not loaded until the original "live data" mechanism start to work. That is, the data is not loaded into Listitem yet so you get null value and empty label.
It can be verified easily. Prepare a <button> and put your "for loop code" in onClick event listener and you will see the differences.
/henri
@fati, this is an 4 years old thread. please open a new one.
Asked: 2007-07-10 15:00:32 +0800
Seen: 383 times
Last updated: Jun 13 '11