TreeStroe load 时除了正常请求外还附带了一个node=root的请求,如何取消该请求?
Console:
GET http://localhost:8080/Accordion/treenode/view.action?_dc=1341394277181&node=root 400 (Bad Request) ext-all-debug.js:17836
VIEW CODE:
[js]
initComponent: function() {
var me = this;
...
callback: function(records,operation,success){
for ( var i = 0; i < this.data.length; i++) {
me.add(Ext.create("Ext.tree.Panel", {
title : ''+this.getAt(i).data.nodename+'',
iconCls : 'node-'+i,
rootVisible : false,
viewConfig : {loadingText : "Menu Loading.."},
store : Ext.create('PersonMani.store.TreeNodes').load({
params: {tpid: this.getAt(i).data.id}
})
}));
...
});
me.callParent(arguments);
}
[/js]
STORE CODE:
[js]
Ext.define('PersonMani.store.TreeNodes', {
extend: 'Ext.data.TreeStore',
requires: 'PersonMani.model.TreeNode',
model: 'PersonMani.model.TreeNode',
proxy: {
type: 'ajax',
api: {
read : 'treenode/view.action'
},
reader: {
type: 'json',
root: 'data',
successProperty: 'success'
},
root: {
id: 'rootNode',
text: 'Root',
expanded: false,
rootVisible:false,
},
listeners: {
exception: function(proxy, response, operation){
Ext.MessageBox.show({
title: 'REMOTE EXCEPTION',
msg: operation.getError(),
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
}
}
}
});
[/js]