PDA

View Full Version : Problem NestedList: How to use simply Code



myput
20 Sep 2011, 1:21 AM
hey,

I have a problem in my NestedList, in my View.
I don't know really how to use the tutorial code, cause all of that is use in app.js and i have some views and tabPanel.
I have my Store, my Model, and my View, it's a NestList view.
In my model: i have:


Ext.regModel('ListItem', {
fields: [
{name: 'text', type: 'string'},
{name: 'info', type: 'string'},
{name: 'model', type: 'string'},
{name: 'items', type: 'auto'},
{name: 'duration', type: 'auto'},
]
});

in my Store:


WPApp.NavigationListStore = new Ext.data.TreeStore({
model: 'NavigationListModel',
proxy: {
type: 'ajax',
url: '/data/tracks.json',
reader: {
type: 'tree',
root: 'items'
}
}
});

And in my navigationListView:


WPApp.views.NavigationListView = Ext.extend(Ext.NestedList, {
store: WPApp.stores.NavigationListStore,
initComponent: function() {
WPApp.views.NavigationListView.superclass.initComponent.call(this);
}
});


Ext.reg('NavigationListView', WPApp.views.NavigationListView);


For the moment, it's like the video tutorial, but nothing work. I have a white page :(

Then, how to implement the nestedList in a view from a tabPanel? :)

myput
20 Sep 2011, 6:14 AM
I resolved this part of code.
If someone want how to do a nestedList in TabPanel, it's here:
http://www.sencha.com/forum/showthread.php?147688-NestedList-in-a-Panel&p=650928#post650928
(http://www.sencha.com/forum/showthread.php?147688-NestedList-in-a-Panel&p=650928#post650928):)