2

ExtJS 4.2.1 を使用して、ユーザーがコンボの入力フィールドに入力を開始したときに、valueFieldではなく、displayField に対してクエリを実行する「コンボ」ボックスをどのようにコーディングしますか?

以下は、コンボボックスのセットアップです。

    xtype: 'combo',
    itemId: 'usersCbo',
    width: 450,
    forceSelection: true,
    fieldLabel: 'Assign Selected TestRuns To',
    labelAlign: 'right',
    labelWidth: 180,
    queryMode: 'local',
    valueField: 'USERNAME',
    displayField: 'FULLNAMES',
    triggerAction: 'all',
    typeAhead: true,
    allowBlank: false,
    store: Ext.create('Ext.data.Store', {
        storeId: 'testRunUsersStore',
        autoLoad: true,
        pageSize: 1000,
        proxy: {
            type: 'ajax',
            url: 'app/php/stores/Test_Run/testEngineers.php',
            reader: {
                type: 'xml',
                record: 'Record',
                root: 'Records',
                totalProperty : '@totalRecords'
            }
        },
        fields: [
            { name: 'USERNAME',     type: 'string' },
            { name: 'FULLNAMES',    type: 'string' }
        ],
        sortOnLoad: true,
        sorters: { property: 'USERNAME', direction: 'ASC' }
    })
4

1 に答える 1

0

このブログ投稿で詳しく説明されているソリューションは、私の問題を解決します。一致する大文字と小文字を区別しないようにする方法が必要だったようです。そして、displayField の生の値に対してマッチングが行われるのは事実です。

http://atechiediary.blogspot.in/2013/06/first-page-extjs-containslike-search-in.html

于 2013-11-06T18:05:33.417 に答える