PDA

View Full Version : Can getDetailCard show a custom panel



lucaverrascina
19 Sep 2011, 2:01 AM
Hi everyone,

I'd like to know if there's a way to show a custom panel when a leaf Item is clicked in a Nested List...
for example in the list:

ANIMALS
DOGS
dog1
dog2
dog3
CATS
cat1

when I click cat1 I want to show a new App.views.medicalPanel that contains the medical data of cat1, a picture and other datas...how could I do it?

existdissolve
19 Sep 2011, 4:35 PM
Hi @lucaverrascina--

Would you mind sharing what you've tried so far? There are a number of ways that you could do this. For example, you could make an AJAX request to retrieve HTML content, and then update the contents of a panel with that content. Or, you could go the DataView (http://dev.sencha.com/deploy/touch/docs/?class=Ext.DataView)route and build out the contents of your panel via templates and data from a store.

Lots of options, so be sure to try out a few to find what works for your app. And be sure to check back if you have questions about any particular approach.

Hope this helps!

lucaverrascina
19 Sep 2011, 11:20 PM
Here's the code (there isn't the JSON data, I can add it if you ask):

http://www.sencha.com/forum/showthread.php?147638-Error-when-a-Leaf-is-touched-in-Nested-List&p=650669

A (http://www.sencha.com/forum/showthread.php?147638-Error-when-a-Leaf-is-touched-in-Nested-List&p=650669)nyway the HTML content isn't avalayble directly, I think building it via templates and data from the store is the better choice. I'll try....thanks!