【发布时间】:2011-11-11 13:09:48
【问题描述】:
我是煎茶触摸的新手,并且正在经历强制性的头发拉扯和 head2desk 冲击。
我正在尝试显示一个列表,但我遇到了问题。
我使用 beforeshow 事件在列表显示之前加载我的 json 存储。但它不会触发事件。如果有任何可以提供帮助的,我们将不胜感激。
我的代码如下:*注意- 此代码以 AS/400 为中心,因此 /%...%/ 是为此而设计的
function doList() {
var List1 = new Ext.List ({
id : List1,
renderTo : 'panel',
fullscreen: true,
showAnimation: {
type: 'slide',
duration: 250
},
cls: 'demo-list',
width: Ext.is.Phone ? undefined : 300,
height: 500,
store: ListStore,
itemTpl: '<strong>{SCEQPT}</strong>',
grouped: true,
indexBar: true,
onItemDisclosure: function(record, btn, index) {
doPopUp(record);
},
listeners: {
'beforeshow': function () {
alert('beforeshow');
var StoreList = Ext.StoreMgr.get('ListStore'
StoreList.load({
params: {
screfr: Ext.getCmp('SCREFR').getValue(),
scptyp: scptyp,
user : '/%SCUSER%/'
}
});
}
}
});
}
【问题讨论】: