View Full Version : NestedList - add data to leaf item

15 Jul 2011, 6:05 AM
Hi folks,

is it possible to add to a leaf item of a nested list??
For example like the AsyncTreeNode in ExtJS?

Best regards,

20 Jul 2011, 1:36 AM

is there nobody that could give me a hint or drive me into the right direction?? Maybe this is not supported to load data and add it as childrens.
I just want to load data when I click on an item whatever it is leaf or not.

Here is my code i tried to load the data. My data for the next card is loaded but then I click on the loaded data item I don't have the recordNode from the record in the store. All items returned are leaf nodes. Here is my way i tried to do:

onItemTap: function(subList, subIdx, el, e) {
var store = subList.getStore(),
record = store.getAt(subIdx),
recordNode = record.node,
parentNode = recordNode ? recordNode.parentNode : null,
displayField = this.displayField,
url = record.get('url'),

// this is what I added
if(url) {
var subStore = this.store.getSubStore(recordNode);
subStore.proxy.url = "my url to call";
subStore.proxy.extraParams = {url: url};

nextList = this.addNextCard(recordNode);

if (recordNode.leaf) {
this.fireEvent("leafitemtap", subList, subIdx, el, e, nextList);

if (nextList) {
// depth should be based off record
// and TreeStore rather than items.
nextDepth = this.items.indexOf(nextList);

this.setActiveItem(nextList, {
type: this.cardSwitchAnimation