1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    7
    Vote Rating
    0
    amitdutta is on a distinguished road

      0  

    Default Combo autocomplete issue

    Combo autocomplete issue


    Hi
    I am facing problem with the combo autocomplete
    Issues:
    1) It is not filtering the search as the user types ahead
    2) I observed(in firebug) everytime I type a letter it is fetching the result thru rest call.
    Any pointer will be helpful...
    Code:
    Model-------------

    Ext.define('TopoApplication.model.MDeviceDetail', {
    extend: 'Ext.data.Model',
    fields: [
    {
    name: 'deviceName',
    mapping: 'name'
    },
    {
    name: 'id',
    mapping: 'id'
    },
    {
    name: 'deviceType',
    mapping: 'deviceType'
    },
    {
    name: 'longname',
    mapping: 'longname'
    },
    {
    name: 'state',
    mapping: 'state'
    }

    ],
    proxy: {
    type : 'rest',
    extraParams: {
    test:'2'
    },
    url :'topo/message',
    // format: 'json',
    reader: {
    type:'json',
    root : 'devicelist'
    }

    }

    });
    -----------------------------------------
    Store:
    Ext.define('TopoApplication.store.SDeviceDetail', {
    extend : 'Ext.data.Store',
    model : 'TopoApplication.model.MDeviceDetail',
    autoLoad: true
    });
    View:

    var combo = {
    xtype : 'combo',
    fieldLabel : 'Search By Device Name',
    forceSelection : true,
    valueField : 'id',
    displayField : 'deviceName',
    typeAhead : true,
    hideTrigger: true,
    loadingText : 'Querying....',
    // pageSize : 20,
    minChars : 1,
    triggerAction : 'all',
    //itemSelector : 'div.search-item',
    store : 'SDeviceDetail',
    listeners: {
    'select': {fn:function(){console.log(this.getValue());}}
    }
    };

    Ext.define('TopoApplication.view.device.DeviceDetail', {

    extend : 'Ext.window.Window',
    title : 'Device Detail Information',
    width : 500,
    height : 620,
    alias : 'widget.deviceDetail',
    defaults : {
    bodyStyle : 'padding:15px'
    },
    items : combo,
    initComponent : function() {
    console.log('initComponent: DeviceDetail Window');
    this.viewConfig = {
    forceFit : true
    };
    this.callParent(arguments);
    this.show();
    }
    });
    Controller:
    Ext.define('TopoApplication.controller.CDeviceDetail', {
    extend : 'Ext.app.Controller',
    stores : ['SDeviceDetail'],
    models : ['MDeviceDetail'],
    views : ['device.DeviceDetail'],
    // views : ['device.Grid'],
    init : function() {
    // When we declare stores and models, the controller will automatically create getter functions for them.
    // this.getSDeviceDetailStore().load();

    this.control({
    'viewport>panel' : {
    render : this.onPanelRendered
    }
    });
    console.log('Initialized CDeviceDetail Controller');
    },

    onPanelRendered : function() {
    console.log('The panel was rendered');
    }

    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,789
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Are you handling the request properly to return only the results that match?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    7
    Vote Rating
    0
    amitdutta is on a distinguished road

      0  

    Default


    My issue is resolved.

    I had to set the in combo defination
    querymode = 'local'

    Thanks for help !!

    Amit

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi