View Full Version : listing record specific nested data from a single store

21 Sep 2011, 7:50 AM
I have a store, model, scriptTagProxy and custom Reader that consumes some json(p). The json describes a collection of objects. Each parent object hasMany child objects.

Is it possible to use an Ext.List to list all the children for a parent? - In my research it seems that you have to point a list at a store.

I would like alternatives to a nestedList.


21 Sep 2011, 10:55 AM
Hi lukemc.
If I well understand what you are asking the reply is yes you can!
You have to define an Ext.List component, a Store that you will bind to the List, and a Model that you describe the data that your store have to contains.
Then you have to defined an Ext.XTemplate for the child objects only, to be used by your List.

(Take a look at the XTemplate docs (http://dev.sencha.com/deploy/touch/docs/?class=Ext.XTemplate))

Then on your JSONP callback, you have to load the store with your data.
It's not so hard like it seems.
If you post some of your app code, I will help you with that.

Hope this helps.

22 Sep 2011, 1:41 AM
Thanks for reply, I would think there is a bit too much code to post.

I know that you can use Ext.XTemplate to access children of a record. But If I understand correctly, what your saying that through the list itemTpl you can pull these children into its own cell in the list?

Does the List not query the store for it's length? or would I have to override this to query a specific records child array length?