PDA

View Full Version : Dynamicially adding subitems to a clicked nestedList item



FlorianArndt
9 Aug 2010, 7:00 AM
Hi there,

I have a nestedlist, which has a listchange event. On that event, I run


function eventHandler(list, item) {
//...
item.items = new Array();
item.items.push( { text: 'A', hotelID: 'hotel123' } );
item.fireEvent("listchange", Ext.getCmp('nestedRegionList'), list, item);
//...
}


to add subitems to the pressed one and then enter the sub-menu automaticially.
Currently I still have to tap the item twice to enter the sub-menu. After that it works as desired = at the first tap.

Any pointers?

TIA
Florian

FlorianArndt
13 Aug 2010, 12:42 AM
Running
myList.onItemTap(itemToTap); works perfectly :-)

yasodha
24 Jan 2011, 10:31 PM
Can u please post the working code. I need it urgently. or just tel where should i call that eventhandler function .