加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Extjs下拉框笔记

发布时间:2020-12-16 00:41:14 所属栏目:百科 来源:网络整理
导读:Ext.define("formTP",{ extend:"Ext.data.Model", fields : [ {name: 'tNFormTPId',type: 'long'}, {name: 'fmTpName',type: 'string'} ] }); var comboxStore = Ext.create("Ext.data.Store",{ model:"formTP", proxy:{ type:"ajax", url:"createNewForm/cr



Ext.define("formTP",{

extend:"Ext.data.Model",
fields : [
{name: 'tNFormTPId',type: 'long'},
{name: 'fmTpName',type: 'string'}
]

});

var comboxStore = Ext.create("Ext.data.Store",{
model:"formTP",
proxy:{
type:"ajax",
url:"createNewForm/createNewForm!viewFormTPData.action",
reader: {type: 'json',root : "formTPList"}
}

});

comboxStore.load();


var comboBox = Ext.create('Ext.form.ComboBox',{
store: comboxStore,
valueField : "tNFormTPId",
displayField : "fmTpName",
mode : 'remote',
forceSelection : true,// 必须选择一个选项
editable : false,
triggerAction : 'all',// 因为这个下拉是只能选择的,所以一定要设置属性triggerAction为all,不然当你选择了某个选项后,你的下拉将只会出现匹配选项值文本的选择项,其它选择项是不会再显示了,这样你就不能更改其它选项了。
allowBlank : false,
emptyText:"FormType Name",
fieldLabel: 'FormType Name',
name:"formTPId",
margin: '5 10 5 10',
width:422,
labelWidth: 200

});

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读