[code="js"]
var alarmCategoryStore = new Ext.data.JsonStore({
id : 'ef_alarmCategoryStore',
autoLoad : true,
root : 'category',
url : 'alarmcategory.do',
baseParams : {
method : 'getAlarmCategory'
},
fields : [{
name : 'categoryName',
mapping : 'categoryName'
}, {
name : 'ALARM_CATEGORY_ID',
mapping : 'alarmCategoryId'
}]
});
var alarmCategory = new Ext.ux.form.LovCombo({
editable : false,
id : 'ef_alarmCategory',
name : 'ALARM_CATEGORY_ID',
width : 250,
hiddenName : 'ALARM_CATEGORY_ID',
maxHeight : 200,
fieldLabel : 'Alarm Category',
labelSeparator : '',
store : alarmCategoryStore,
// value : 'all',
displayField : 'categoryName',
valueField : 'ALARM_CATEGORY_ID',
triggerAction : 'all'
// ,mode:'local'
});
var TopicRecord = Ext.data.Record.create([{
name : 'categoryName',
mapping : 'categoryName'
}, {
name : 'ALARM_CATEGORY_ID',
mapping : 'alarmCategoryId'
}]);
var myNewRecord = new TopicRecord({
categoryName : 'all',
ALARM_CATEGORY_ID : 'all'
});
alarmCategoryStore.on('load', function() {
this.insert(0, myNewRecord);
if (settingJson != undefined) {
if (settingJson.setting.ALARM_CATEGORY_ID_OPER == "ANY") {
Ext.getCmp('ef_alarmCategory').selectAll();
// alarmCategory.selectAll();
// var checkValue = alarmCategory.getCheckedValue()
// .substring(0, 3);
// alarmCategory.deselectAll();
// alarmCategory.setValue(checkValue);
// Ext.Msg.alert('ok',alarmCategory.getCheckedValue());//.substring(4,alarmCategory.getCheckedValue().length)
}
}
});
[/code]
在ie上出现了this.el.dom为空或者不是对象,好像ff 3.0.(debug)1.3上也会这样
主要是在这里注释这里,我debug时store是有数据的,
我现在是在1.4里没问题,能不能告诉我这是为什么?
[b]问题补充:[/b]
从上面的代码看,是已经初始化了,而且执行这句的时候是在监听load时执行的,
[b]问题补充:[/b]
ff 3.0.(debug)1.3上也会这样(this.el.dom 不是对象)
ie上也是(不是对象)
ff3.5,debug1.4就不会
[b]问题补充:[/b]
我的是2.2