有人知道如何刷新嵌套列表吗?
我正在创建一个列表。点击一个项目,它就会加载一个嵌套列表。如果我在一个嵌套列表中遍历,然后点击另一个项目并返回到上一个项目,它仍然停留在它最后离开的地方。
我试着用
Ext.getCmp('nestedList').refresh();
但是这个方法似乎不起作用。
下面是我的嵌套列表面板的代码。
Ext.define("InfoImage.view.nestedList", {
extend:'Ext.NestedList',
xtype:'nestedList',
id:'nestedList',
config:{
fullscreen:'true',
title:'Work Items Task 1',
// ui:'normal',
xtype:'nestedList',
displayField : 'text',
store:'nestedListStore',
style: {
'background-color': 'rgba(0,140,153,0.1)'
}
}
});
加载嵌套列表的代码是:
showListDetail : function(view, index, item, record) {
var rec = view.getStore().getAt(index);
// Ext.getStore('workItemStore').add({Task: '7'
// },{Server: 'mobcomp1'});
if (index == 0) {
this.getDocPanel().animateActiveItem(
this.getNestedPanel(), {
type : 'slide',
direction : 'up',
duration : 250
});
Ext.getCmp('nestedList').reload();
}
任何帮助都是非常感谢的。
提前谢谢。
发布于 2012-05-10 12:40:55
您不能直接刷新nestedlist
。没有用于它的refresh()
或reload()
方法。
您所需要做的就是使用配置好的proxy
对用于您的nestedlist
的存储执行load
。
this.store.setProxy({
// proxy configurations ...
// ......
// ......
});
this.store.load();
https://stackoverflow.com/questions/10527329
复制相似问题