Ext中左侧tree与右侧grid,grid分页问题。因为右侧grid的内容来自根据node.id查询的sql结果。并且node.id是通过tree的单击事件从ds.load.parms 传进去的。所以当点击下一页的时候,无法获取node.id自然就不会执行后台action中的方法。现在我将第一次获取的node.id放入jsp中隐藏域。然后再js用document对象获取这个对象可以,但是如何将其放入ds.parms传到后台,或者将node.id放入ds的url中通过action传入后台。
ds = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
method : 'POST',
url : 'txlListJson.action'
}),
tree.on(click'',function(){
ds.load({params : {
orgid : node.id,
start : 0,
limit : 20
}
});
})
就是这两个地方。