Revision history [back]

click to hide/show revision 1
initial version

answered 2011-02-09 09:15:27 +0800

xcom gravatar image xcom

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="@&lt;DispositivoViewCtrl.model&gt;"> <listhead sizable="true"> <listheader label="Name"/> </listhead> <listitem self="@{each=myObject}"> <listcell label="@{myObject.name}"/> </listitem> </listbox> </window>

zk 5.0.5(opssrc)

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More