小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

Ext.form.ComboBox 動(dòng)態(tài)加載數(shù)據(jù)后設(shè)置下拉選項(xiàng)

 一本正經(jīng)地胡鬧 2019-06-13

//獲取系統(tǒng)配置項(xiàng)下拉列表

function GetSysConfigComboBox(groupId, inputName, fieldLabel, value, disabled) {

    var store = new Ext.data.Store({

        proxy: new Ext.data.HttpProxy({ url: "SysConfigAction.ashx?action=list&groupid=" + groupId }),

        reader: new Ext.data.JsonReader(

                      { root: "" },

                      Ext.data.Record.create(["Value", "Remark"])

                      )

    });

    var combo = new Ext.form.ComboBox({

        store: store,

        hiddenName: inputName, //提交到后臺(tái)的input名稱

        valueField: 'Value',

        displayField: 'Remark', //store字段中你要顯示的字段,多字段必選參數(shù),默認(rèn)當(dāng)mode為remote時(shí)displayField為undefine,當(dāng)select列表時(shí)displayField為"text"

        mode: 'local', //因?yàn)閐ata已經(jīng)取數(shù)據(jù)到本地了,所以'local',默認(rèn)為"remote",枚舉完

        triggerAction: 'all', //很重要

        emptyText: '請(qǐng)選擇...',

        editable: false,

        fieldLabel: fieldLabel   //設(shè)置表單中顯示的標(biāo)簽

    });

    store.on('load', function() { //數(shù)據(jù)加載完成后設(shè)置下拉框值

        if (value)

            combo.setValue(value);

        combo.disabled = disabled;

    });

    store.load();

    return combo;

}

--------------------- 


轉(zhuǎn)自 https://blog.csdn.net/ranbolwb/article/details/7347374 

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多