EXT combobox赋值
来源:互联网 发布:java 泛型 getclass 编辑:程序博客网 时间:2024/06/10 07:53
Ext.combobox对象在通过setValue赋值时,必须在combobox对象的store对象中存在该值,否则无法赋值。
事例:
{
xtype: 'fieldcontainer',
combineErrors: true,
msgTarget : 'side',
id:'module_container_id',
layout: 'hbox',
defaults: {
flex: 1,
allowBlank: false,
labelWidth : 90
},
items: [{
xtype : 'textfield',
fieldLabel:'所属模块',
name:'module_name',
id:'module_name',
allowBlank : true,
maxLength:300
},{
xtype:'button',
id:'cpczscbtn',
text:'选择模块',
flex:0.3,
handler:function(){
showBaselineSelector(coczscCallback,true);
}
}]
},
function coczscCallback(records){
var name = '';
var id = '';
var module_version = '';
Ext.Array.each(records,function(r){
name = name + r.data.module_name + r.data.module_version;
id = id + r.data.p_module_content_id;
module_version = r.data.module_version;
});
pBug_form.getForm().findField('module_name').setValue(name);
pBug_form.getForm().findField('p_task_id').setValue(id);
versionComboStore.add({text:module_version , value:module_version});
Ext.getCmp('task_version1').setValue(module_version);
pBug_form.getForm().findField('module_name').setReadOnly(true);
}
var versionComboStore = Ext.create("Ext.data.Store",{
fields: ['text', 'value'],
proxy:{ //数据代理
type: 'ajax',
method: 'POST',
reader: {//读取器
type: 'json'
}
},
autoLoad:false
});
- EXT combobox赋值
- Ext,ComboBox
- combobox赋值
- Ext ComboBox 展示
- Ext ComboBox 宽度
- ext ComboBox 连动
- Ext.form.ComboBox tip
- Ext combobox refresh
- Ext Combobox的应用
- Ext Combobox使用 Demo
- Ext.form.ComboBox
- Ext的combobox案例
- Ext ComboBox 分页功能
- Ext ComboBox 宽度
- Ext.form.ComboBox
- Ext - ComboBox - JS
- Ext combobox store add
- ext.net ComboBox
- MSP430F249硬件I2C查询法读写AT24C02
- Asterisk拨号方案中变量的应用
- 第三篇 RMAN备份演练初级篇--转自君三思
- 大白话解析模拟退火算法
- su 从root用户切到普通用户执行命令
- EXT combobox赋值
- WdatePicker.js的使用方法 帮助文档 使用说明(时间控件)
- sql注入:
- 订单数量超过forecast数量问题
- MySQL查询获取行号rownum
- the delegate in c shap
- android 按返回退出应用
- 遗传算法入门
- C# 串行化与反串行化--使用BinaryFormatter进行串行化