升级我的组合框

时间:2015-04-10 09:31:44

标签: extjs

使用ExtJS组合框搜索数据的一个问题。 现在一切正常,但是当我在组合框中写了一个名字时,我必须在底部的分页工具栏中按刷新来获取我正在寻找的数据。当我写一些类似MAR的文件时,如何让它自动刷新

{ 

                xtype: 'combobox',          
                queryMode: 'local',
                valueField: 'id',
                fieldLabel: 'Book:',
                name: 'book_fk',
                typeAhead: false,
                hidenTrigger: true,
                hidenLabel: true,
                pageSize: 10,               
                width: 400,
                padding: 5,
                store: Ext.create('Ext.data.Store',
                        {
                            fields: ['id','book','name_author'],
                            autoLoad: true, 
                            pageSize: 10,                       
                            proxy:
                            {
                                type: 'ajax',
                                url: 'book/load',
                                reader:
                                {
                                    type: 'json',
                                    root: 'data',
                                    totalProperty: 'total'
                                }
                            }
                        }),

                listConfig: 
                {
                    loadingText: 'Searching...',
                    emptyText: 'No matching posts found.',

                    getInnerTpl: function() 
                    {
                        return '<a class="search-item" href="book/load?t={topicId}&p={id}"></a>' +
                            '<span>{book}</span> {name_author}' 
                            '{excerpt}'; //+
                        //'</a>';
                    }

                }, 

                displayTpl: Ext.create('Ext.XTemplate',
                                        '<tpl for=".">',
                                            '{book} - {name_author}',
                                        '</tpl>'
                                        )


            },

1 个答案:

答案 0 :(得分:0)

尝试将组合框的queryMode设置为远程。

相关问题