This is model
Ext.regModel('commemModel', {
fields : [ 'name', 'id' ]
});
Define a store and set the default value of the container with id as s1 to the first quarter
var gjcx1 = new Ext.data.Store({
autoLoad:true ,
model : commemModel,
proxy : {
type : 'ajax',
url : '../store/cxjd.json'
},
listeners :{
load:function(){
Ext.getCmp('s1').setValue('q1');
}
}
});
The cxjd.json is given below
[
{name:'First Quarter',id:'q1'},
{name:'Second Quarter',id:'q2'},
{name:'Third Quarter' ,id:'q3'},
{name:'Q4',id:'q4'}
]
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn