View Full Version : Best way to pass data from a list to a panel
23 Jan 2011, 10:48 PM
I have several lists and nested lists that read data from a database via a JSON store. When the user gets to a leaf/disclosure panel, I want to load a second store with the record detail for just the one item they've selected, and display that on the panel. What is the best practice for doing this?
24 Jan 2011, 1:57 AM
I guess that your leaf/disclosure panel is a newly created component that extends FormPanel?
Maybe it's enough to set a property like newPanel.leaf_object_id = some_backend_related_id and then setup your store inside the new panel.
This store then could append the leaf_object_id to the stores proxy url and modify the server backend to return the appropriate object via json.
24 Jan 2011, 12:52 PM
I thought this would be a pretty commonly implemented function and someone might have some good code examples. I'm a little confused as to how to refer to the data records in the parent list and pass them as URL parameters to the second store.
And yes, in most instances it would be a newly created panel called by tapping an item in the list, or else it would be called in getDetailCard in a nested list.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.