PDA

View Full Version : From list to list to info and back.



hotdp
6 Jun 2011, 6:07 AM
Hello
After alot of hours and still not getting there i need your help.

My App has a buttombar and the first item is a product item.
This should show a list of MainGroups. If you pres the list item you shall go the list of SubGroups. If you pres the list item you should go to the ProductList And last if you pres the product item you should go to a Product page. In the top there should be a Back button all the time.

My problem is that i can not get this to work at all. I have tryed the NestedList but when i go from ProductList to Product the BackButton in nestedlist will not work.

What i need help with is the overall structure. Should i have a Panel with no items and then add Ext.List for each level and setActiveItem this way? Or how should the structure be and what components should i use?

martinbroos
7 Jun 2011, 2:16 AM
You should use the Nested List method for this. Loading list after list isn't going to help.
If the only problem your facing is the back button from within the product details you should look in that direction.

To my knowlidge you can dispatch the events and let the controller make the view active again. It will not lose data and show the state where it last was.

like so:


In nested list :



Ext.dispatch({
controller: Controller Location,
action: 'productdetails',
id: selectedItem.data.id, // get the data of the element you clicked ( not that it might be different in your case.
animation: {type:'slide', direction:'up'},
});


in details the same but ditchpatch event back to index view.