this.rdTypeCom=new Ext.form.ComboBox({
              hiddenName:'rdType',
              store:new Ext.data.SimpleStore(
              {
               fields:['value','text'],
               data:[['1','金钱奖励'],['2','名誉奖励'],['3','惩罚']]
              }),
              fieldLabel:"类别",
              mode:'local',
              triggerAction:'all',
              hideTrigger:false,
              allowBlank:false,
              listWidth:150,
              width:150,
              editable:false,
              valueField:'value',
              displayField:'text'
 });

另一种方式:

              fieldLabel : '类型',
                                        name : 'materialType',
                                        hiddenName:'materialType',
                                        xtype:'combo',
                                        triggerAction:'all',
                                        allowBlank : false,
                                        mode:'local',
                                        store:new Ext.data.ArrayStore({
                                           fields:['value','text'],
                                           data:[
                                             ['1','材料'],
                                             ['2','工具']
                                           ]
                                        }),
                                        displayField:'text',
                                        valueField:'value',
                                        blankText:'类型是必填的',
                                        editable:false

Extjs读取本地下拉选框数据源,分为text和value,显示text,传值value的更多相关文章

  1. Javascript -- 示例:多选下拉选框

    1. 示例:多选下拉选框 <html> <head> <meta http-equiv="Content-Type" content="te ...

  2. select下拉选框的默认值,包括每次进入页面的默认值

    下拉选: <select onchange="selectTotal(this.value)" style="width: 50px;">      ...

  3. Yii 生成表单下拉选框及查询下拉选框

    CHtml类参考: http://www.yiichina.com/api/CHtml#activeDropDownList-detail activeDropDownList() 方法 public ...

  4. JS-事件之鼠标、键盘都能控制的下拉选框效果

    <script type="text/javascript"> window.onload=function(e){ var box=document.getEleme ...

  5. JSP下拉选框,级联选择

    前端: <%@ page contentType="text/html;charset=UTF-8" %> <!DOCTYPE html PUBLIC " ...

  6. DOM操作表单(select下拉选框)

    <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>& ...

  7. iview 表单验证 input 用失去焦点事件 blur, select下拉选框 要用change事件 验证

    birthday: [{ required: true, message: '内容不能为空', trigger: 'blur' }],belongDept: [{ required: true, me ...

  8. 在Ueditor的内容区添加一个下拉选框改变事件

    <script>html='';html=html+` <select name="" onchange='this.appendChild(document.g ...

  9. thymeleaf 下拉选框回显选中

    参考了许多,最后以这种方法实现了.尽管有些愚蠢,初步学习阶段.不知道为什么用th:field会报错.网上有些是用field来解决回显问题的. <select name="positio ...

随机推荐

  1. 萤火虫算法-python实现

    FAIndividual.py import numpy as np import ObjFunction class FAIndividual: ''' individual of firefly ...

  2. LINUX下为ORACLE数据库设置大页--hugepage

    在Linux中配置hugepage可以提高oracle的性能,减少oracle sga的页交换,类似于aix中的lagepage. 为什么 使用大页? LINUX内存的默认块大小是4K如果SGA为:1 ...

  3. SCU 4424(求子集排列数)

    A - A Time Limit:0MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit Status Practice ...

  4. POJ2823Sliding Window

    Sliding Window Time Limit: 12000MS   Memory Limit: 65536K Total Submissions: 49919   Accepted: 14391 ...

  5. Yii查看执行的SQL

    开户debug 修改配置文件 :protected/config/main.php, 'log' => array(            'class' => 'CLogRouter', ...

  6. XSS Filter Evasion Cheat Sheet 中文版

    前言 译者注: 翻译本文的最初原因是当我自己看到这篇文章后,觉得它是非常有价值.但是这么著名的一个备忘录却一直没有人把它翻译成中文版.很多人仅仅是简单的把文中的 各种代码复制下来,然后看起来很刁的发在 ...

  7. linux安全加固(1)

    Redhat是目前企业中用的最多的一类Linux,而目前针对Redhat攻击的黑客也越来越多了.我们要如何为这类服务器做好安全加固工作呢? 一. 账户安全 1.1 锁定系统中多余的自建帐号 检查方法: ...

  8. php获取当前方法名和类名

    php提供的一些系统常量可以完成这些 php获取当前方法名(函数名) __FUNCTION__ php获取当前类名 __CLASS__ 或者 get_class($this); php获取本类所有的方 ...

  9. spingMVC<1>-xml文件配置

    ---恢复内容开始---

  10. git常见问题解决办法

    1,git status乱码 git config --global core.quotepath false 执行完后再使用时,就显示正常了