extjs 树刷新_EXTJS 左边是树菜单,点击节点的时候,在右边的Grid显示相应的数据,就是根据节点ID刷新数据,这样的事件怎写呢?...

click: function(n) {

treeNodeId = n.attributes.id;

treeNodeInfo = n.attributes.text;

studentInfostore.load({

params: {

start: 0,

limit: 30

},

callback: function(r, options, success) {

if (success == false) {

window.location.href = "Login.jsp";

}

}

});

}

左边的树添加一个单击事件,让后再单击事件中让右边的gridpanel的store,我这里是studentInfostore,去加载信息,这时动态改变studentInfostore的参数就行了。studentInfostore = new Ext.data.Store({

proxy: new Ext.data.HttpProxy({

method: 'post',

prettyUrls: false,

url: 'getStudentInfo.action'

}),

remoteSort: true,

listeners: {

"beforeload": function(store) {

store.baseParams = {

deptId: treeNodeId,

studentsearchKey: Ext.getCmp("specialkey").getValue()

}

}

}

在store中监听beforeload,让baseParams动态改变 。就行了。

2013年2月25日 14:45

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值