data binding - Bind objects in list with multiple forms -


here problem:

i have list containing objects instances of different classes. bind these objects specific forms, depending on class, when selected in list. best approach?

here a code snippet of tried. unfortunately, variable names seem overlap.

thanks help.

avoid race condition in handling list's selection change.

list.addlistener("changeselection",function(event) {   switch(event.getdata()[0].getmodel().classname)   {     case "test.obj1":       this.stack.setselection([this.renderedform1]);       this.form1controller.setmodel(this.listcontroller.getselection().getitem(0));       break;     case "test.obj2":       this.stack.setselection([this.renderedform2]);       this.form2controller.setmodel(this.listcontroller.getselection().getitem(0));       break;     default:       this.stack.setselection([]);   } }, this); 

for future questions suggest expand questions. question scenario when switch instance of test.obj1 test.obj2 , in list, causes overlap save time of answerer.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -