-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
TERRY:
Because I have to spend the index to him to obtain the objecto in order that it works, because I it cannot utlizar directly
case 1:
public void onSelect$lb(Event event){
int index=lb.getSelectedIndex();
myObject=(MyObject) modelo.get(index);
alert(myObject.getName());
}
WORKKKKKKKKKKKKKKKK
Case 2 (FOLLOWING WHAT GOES OUT IN THE MANUAL)
public void onSelect$lb(){
alert(myObject.name); //is null, because???
}
NOT WORK ?????????????????????
BECAUSE ????????????????????????????????????????
zul <window width="100%" height="100%" border="normal" apply="ViewCtrl"> <listbox id="lb" selecteditem="@{ViewCtrl.myObject}" model="@<DispositivoViewCtrl.model>"> <listhead sizable="true"> <listheader label="Name"/> </listhead> <listitem self="@{each=myObject}"> <listcell label="@{myObject.name}"/> </listitem> </listbox> </window>
zk 5.0.5(opssrc)