-
10 Apr 2011 8:36 AM #1
Passing List Information to another Panel
Passing List Information to another Panel
Hello,
I want to create an application which has a list, and when the user clicks on an item in the list, the information from that list is passed to another panel on a different card/screen of a TabPanel, so essentially, I want when the user clicks a list item it goes to another screen with more details about that item. The new panel will have more information such as an image, some of the data fields from the list item that was clicked passed to it, and a toolbar of buttons at the bottom. I am not sure how to go about doing this.
i also want when the user clicks an item that a new tab is created for it with the title of the tab set to one of the data fields (i.e. the name of the item).
-
10 Apr 2011 9:24 PM #2
I ran into some hangups with this early on, too. You can add a listener to the list items to trigger the new panel:
I commented the two events in there. One loads the new panel, which is what you were asking about. But I thought it would be helpful to know how to also update a toolbar to show a contextually-relevant title.Code:var YourPanel = new Ext.Panel({ items: [{ xtype: 'list', listeners: { itemtap: function(list, index) { DetailsPanel.dockedItems.items[0].setTitle('Selected Name'); // update toolbar title DetailsPanel.setActiveItem('items_details', {type:'slide', direction:'left'}); // load new panel } } }] });
That should push you in the right direction.
Good luck.-------------------------------------------
Mark Wyner, Partner, Bunker
http://bunkercollective.com/
Similar Threads
-
Looking for information on panel management
By taelo in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 16 Dec 2010, 12:57 PM -
Need help passing result of Ajax GET to an item in a panel
By csoon1 in forum Ext 3.x: Help & DiscussionReplies: 6Last Post: 21 Aug 2009, 1:11 PM -
Passing Feed to Panel
By testext in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 29 Dec 2008, 3:08 AM -
Server Side Paging - Passing Page Number / List Size
By bobbymunk in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 18 Jan 2008, 9:14 AM


Reply With Quote