PDA

View Full Version : setActiveItem not working in nested Panel with card layout



alhneiti
2 Oct 2011, 1:37 AM
Hello,

I am having a problem getting this to work and i think its a bug in sencha touch. Attached is the buggy example.

I have my viewport as a Carousel and inside that carousel there are 2 panels. The second panel in that viewport is also a container for 2 nested panels.

In categoriesList view i have the following code:


App.views.catsList = new Ext.List({
store: App.ListStore,
itemTpl: '<div class="contact"><div class="app_name"><strong>{firstName}</strong> {lastName}</div></div>',
onItemDisclosure: function(record, btn, index) {
console.log('onItemDis fired');
try {
Ext.dispatch({
controller: App.controllers.ProductsList,
action: 'show',
id: record.getId(),
animation: {
type:'slide',
direction:'left'
}
});
}
catch(e) {
console.log(e);
}
}
});


As you can see am dispatching to controller ProductsList:



App.controllers.ProductsList = new Ext.Controller({
show: function(options) {
console.log('controller called');
try {
App.views.categories.setActiveItem(
App.views.categoryDetail, options.animation
);
}
catch(e) {
console.log(e);
}
}
});


App.views.categories.setActiveItem is being called with NO errors whatsoever. But categories panel with card layout is not switching to the categoryDetail view.

Check the attached example to see the flow.

Any idea about whats going on? whats causing the panel not to show the requested nested panel?

Hans Wildenberg
25 Nov 2011, 1:16 AM
Hi, did you make any progress on this? I am struggling now with the same situation. The first card shows ok, but I cannot make another one visisble. I also placed a thread, so if I come up with something new, I will let you know.