+ -
当前位置:首页 → 问答吧 → ext js 3.3.1 Combobox 加载Item -调试能够显示-直接浏览不显示

ext js 3.3.1 Combobox 加载Item -调试能够显示-直接浏览不显示

时间:2011-03-05

来源:互联网

{
  layout: 'column',
  border: false,
  items: [{
  columnWidth: .33,
  layout: 'form',
  labelWidth: 90, // 标签宽度
  defaultType: 'textfield',
  border: false,
  items: [new Ext.form.ComboBox({
  hiddenName: 'F_TypeNo',
  fieldLabel: '工作状态',
  emptyText: '请选择',
  triggerAction: 'all',
  store: new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url :'/HRM/GetComBoxItems'
}),
reader : new Ext.data.JsonReader({}, [{
name : 'Value'
}, {
name : 'Text'
}]),
baseParams : {
areacode : '53'
}
}),
  displayField: 'Text',
  valueField: 'Value',
  mode: 'remote',
  forceSelection: false, // 选中内容必须为下拉列表的子项
  editable: true,
  typeAhead: true,
  resizable: true,
  anchor: '100%'
  })]
  }

作为一个Item放在FormPanel里面,后台返回值:

[{"Value":"h00 ","Text":"正式工"},{"Value":"h01 ","Text":"临时工"},{"Value":"h02 ","Text":"配送商"},{"Value":"h03 ","Text":"短期促销员"},{"Value":"h04 ","Text":"实习生"},{"Value":"h05 ","Text":"试用期"},{"Value":"h06 ","Text":"离职"},{"Value":"h07 ","Text":"离退休"}]

作者: lihui123   发布时间: 2011-03-05

看combo的store里面有没有数据

作者: aj3423   发布时间: 2011-03-05

热门下载

更多