1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    117
    Vote Rating
    0
    Tony Mariella is on a distinguished road

      0  

    Default ComboBox typeAhead

    ComboBox typeAhead


    I have a ComboBox working correctly using an XML Reader. But the type ahead does not seem to work correctly. Whatever I type in the text box, the first element that is returned is always selected. Any ideas ?

    Code:
    /*
     * Ext JS Library 2.1
     * Copyright(c) 2006-2008, Ext JS, LLC.
     * licensing@extjs.com
     * 
     * http://extjs.com/license
     */
    
    Ext.onReady(function(){
    
        var ds = new Ext.data.Store({
                url: 'getData.do',
            reader: new Ext.data.XmlReader({
                record: 'item'
            }, [
                {name: 'record', mapping: 'RECORD'}
            ])
        });
    
        // Custom rendering Template
        var resultTpl = new Ext.XTemplate(
            '<tpl for="."><div class="search-item">',
                '<h3>{record}</h3>',
            '</div></tpl>'
        );
        
        var search = new Ext.form.ComboBox({
            store: ds,
            displayField:'record',
            typeAhead: true,
            typeAheadDelay: 100,
            selectOnFocus: true,
            minChars: 2,
            loadingText: 'Searching...',
            width: 570,
            pageSize:10,
            hideTrigger:true,
            tpl: resultTpl,
            applyTo: 'search'
            }
        });
    });
    
    <result>
    	<item><RECORD>ABC-DEF</RECORD></item>
    	<item><RECORD>ABB-DEF</RECORD></item>
    	<item><RECORD>BBC-DEG</RECORD></item>
    	<item><RECORD>BBD-EFG</RECORD></item>
    </result>

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    117
    Vote Rating
    0
    Tony Mariella is on a distinguished road

      0  

    Default


    After looking extensively. I found the solution: set
    Code:
    mode:'local'
    and load the store.
    Code:
    ds.load();

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar