Creating Treestore and setting root isn't work
This line works perfectly:
Ext.create('Ext.data.TreeStore', {
id: 'categoryStore',
model: 'CategoryModel',
listItemId: '#categoriesListCategoriesView',
defaultRootProperty: 'categoryList',
root: data
});
However this 2 lines, which means the same are not working.
Ext.create('Ext.data.TreeStore', {
id: 'categoryStore',
model: 'DeviceAPIFramework.model.CategoryModel',
listItemId: '#categoriesListCategoriesView',
defaultRootProperty: 'categoryList'
});
Ext.getStore('categoryStore').setRoot(data);
If I create the store with an initial root, I can see the data on a
nestedlist. If not, the nestedlist is empty.
No comments:
Post a Comment