i want to refresh kitchen sink(http://pydictionary.appspot.com/) sencha’s left hand side menu whose data source is json. I have changed the data in .json file but menu doesn’t load new data in menu.
data is coming from leftmenu.json
Ext.regModel('Demo', {
fields: [
{name: 'text', type: 'string'},
{name: 'source', type: 'string'},
{name: 'leaf', type: 'boolean'}
]});
sink.StructureStore = new Ext.data.TreeStore({
model: 'Demo',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'leftmenu.json',
reader: {
type: 'tree',
root: 'items'
}
}});
i am trying to reload it in following ways…but not working
sink.StructureStore.setProxy(sink.StructureStore.getProxy());
sink.StructureStore.getRootNode().removeAll();
sink.StructureStore.load();
i just need to add one magical line which i missed
this menu is loaded when user clicks “Table of contents option” of first level menu. now its working