日期:2014-05-16 浏览次数:20396 次
Ext.define("AM.store.VsWsEeConfigStore", {
extend : "Ext.data.Store",
// requires : ['AM.model.VsWsEeConfigModel'],
model : "AM.model.VsWsEeConfigModel",
proxy : {
type : "ajax",
url : "/ws/vswseeconfig/getinfo",
reader : {
type : "json"
}
},
autoLoad : true
});
Ext.define("AM.controller.VsWsEeController", {
extend : "Ext.app.Controller",
views : ["VsWsEeCongfigForm"],
models : ["VsWsEeConfigModel"],
stores : ["VsWsEeConfigStore"],
init : function() {
this.control({
"vswseecongfigform button[text=修改]" : {
click : function() {
alert("修改");
}
},
"vswseecongfigform numberfield[fieldLabel=退服时长限制(小时)]" : {
render : function(container) {
var store = Ext
.getStore("VsWsEeConfigStore");
console.log(store);
console.log(store.getCount());
console.log(store.data);
console.log(store.data.items);
console.log(store.data.items.data);
container.setValue(72);
}
}
});
}
});
Ext.Loader.setConfig({
enabled : true
});
Ext.application({
name : "AM",
appFolder : "app",
launch : function() {
Ext.create('Ext.container.Viewport', {
items : [{
xtype : "vswseecongfigform",
autoShow : true,
modal : true
}]
});
},
controllers : ["VsWsEeController"]
});
Ext.define("AM.model.VsWsEeConfigModel", {
extend : "Ext.data.Model",
fields : [{
name : 'alarmDuration',
type : 'int',
mapping : "alarmDuration"
}, {
name : 'siteState',
type : 'int',
mapping : "siteState"
}, {
name : 'telephoneTraffic',
type : 'float',