代码如下:var sexds=[{"SexID":"Y","SexName":"男"},{"SexID":"N","SexName":"女"}];
var sexStore=new Ext.data.JsonStore({ data: sexds, fields: ["SexID","SexName"] });
new Ext.FormPanel
(
{
labelWidth: 75,
frame: true,
width: 580,
waitMsgTarget: true,
items:
[
{
layout: 'column',
border: false,
items:
[
{
columnWidth: .34,
layout: 'form',
border: false,
items:
[
CmoSex = new Ext.form.ComboBox
(
{
fieldLabel: ' 性别',
labelStyle: 'width:70px',
width: 170,
editable: false, //不允许输入
name: 'Sex',
store: sexStore,
emptyText: '--请选择--',
allowBlank: false, //不允许为空
blankText: '请选择性别', //错误提示信息
displayField: 'SexName',
valueField: 'SexID',
hiddenName: 'SexID',
mode: 'client',
triggerAction: 'all',
selectOnFocus: true
}
)
]
}
]});在选择下拉控件的时间报 'this.proxy' 为空或不是对象
这是怎么回事呀,哪里写错了!!!!
var sexStore=new Ext.data.JsonStore({ data: sexds, fields: ["SexID","SexName"] });
new Ext.FormPanel
(
{
labelWidth: 75,
frame: true,
width: 580,
waitMsgTarget: true,
items:
[
{
layout: 'column',
border: false,
items:
[
{
columnWidth: .34,
layout: 'form',
border: false,
items:
[
CmoSex = new Ext.form.ComboBox
(
{
fieldLabel: ' 性别',
labelStyle: 'width:70px',
width: 170,
editable: false, //不允许输入
name: 'Sex',
store: sexStore,
emptyText: '--请选择--',
allowBlank: false, //不允许为空
blankText: '请选择性别', //错误提示信息
displayField: 'SexName',
valueField: 'SexID',
hiddenName: 'SexID',
mode: 'client',
triggerAction: 'all',
selectOnFocus: true
}
)
]
}
]});在选择下拉控件的时间报 'this.proxy' 为空或不是对象
这是怎么回事呀,哪里写错了!!!!
x: 425,
y: 7,
text:'状态:',
xtype:'label'
},{
x:460,
y:2,
id:'statusCombo',
xtype:'combo',
valueField: "statusid",
displayField: "statevalue",
mode: 'local',
triggerAction: 'all',
value:'0',
store:new Ext.data.SimpleStore({
fields: ['statusid', 'statevalue'],
data : [['0','所有'],['1','未提交'],['2','已提交']]
}),
width:65,
listeners: {
select: function(combo,record){
stSearch();
}
}
}
Ext.onReady(function() {
var sexds = [{
"SexID": "Y",
"SexName": "男"
},
{
"SexID": "N",
"SexName": "女"
}];
var sexStore = new Ext.data.JsonStore({
data: sexds,
fields: ["SexID", "SexName"]
}); var p = new Ext.form.FormPanel({
renderTo: "form",
labelWidth: 75,
frame: true,
width: 580,
items: {
xtype: "combo",
fieldLabel: ' 性别',
labelStyle: 'width:70px',
width: 170,
editable: false,
name: 'Sex',
store: sexStore,
emptyText: '--请选择--',
allowBlank: false,
blankText: '请选择性别',
displayField: 'SexName',
valueField: 'SexID',
hiddenName: 'SexID',
mode: 'local',
triggerAction: 'all',
selectOnFocus: true
}
});
});