Hybrid View

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    16
    Vote Rating
    0
    jhachero is on a distinguished road

      0  

    Default Search Text Input Box

    Search Text Input Box


    Hi Guys,

    Good day.

    Can you please help me help locate the code which triggers the Search Input box and the code which displays the results? I need to modify it so that the user first keyboard input would appear in the search text input box and the first row of the result would be highlighted.

    Thank you in advance.

    Regards,

    Jasper

  2. #2
    Sencha User
    Join Date
    Dec 2010
    Posts
    16
    Vote Rating
    0
    jhachero is on a distinguished road

      0  

    Default


    Can anyone please help me on this? Thank you.

  3. #3
    Sencha - Services Team
    Join Date
    Mar 2007
    Location
    Foristell, MO
    Posts
    1,108
    Vote Rating
    3
    jratcliff is on a distinguished road

      0  

    Default


    I'll try and get you an answer tomorrow (actually later today). Been swamped working the the Ext JS 4.0 Beta release and haven't had time to look into this.

  4. #4
    Sencha User
    Join Date
    Dec 2010
    Posts
    16
    Vote Rating
    0
    jhachero is on a distinguished road

      0  

    Default


    Thank you very much. I'm looking forward for your help.

  5. #5
    Sencha User
    Join Date
    Dec 2010
    Posts
    16
    Vote Rating
    0
    jhachero is on a distinguished road

      0  

    Default


    Hi Jack Ratcliffe,

    Good day.

    Can you please help me on this? I really need your help.

    Thank you.

    Regards,
    Jhachero

  6. #6
    Sencha - Services Team
    Join Date
    Mar 2007
    Location
    Foristell, MO
    Posts
    1,108
    Vote Rating
    3
    jratcliff is on a distinguished road

      0  

    Default


    The code is in a class called Ext.nd.SearchPlugin in a file named /source/widgets/grid/SearchPlugin.js. The method you are interested in is called onTriggerSearch (posted below). Does this help? I'm not sure I understand what you are wanting to do/change.


    Code:
        onTriggerSearch: function(){
            if (!this.field.isValid()) {
                return;
            }
            var val = this.field.getValue();
            var store = this.uiView.getStore();
            
            var vni = this.uiView.viewUrl.lastIndexOf('/') + 1;
            var dbPath = this.uiView.viewUrl.substring(0, vni);
            var viewName = this.uiView.viewUrl.substring(vni);
            
            
            var baseParams = {
                db: dbPath.substring(0, dbPath.length - 1),
                vw: viewName
            };
            
            if (!this.isSearching) {
                this.oldDataSource = this.uiView.getStore(); // Save the current DS so we can restore it when search is cleared
                if (this.oldDataSource.baseParams.RestrictToCategory) {
                    baseParams = Ext.apply(baseParams, {
                        RestrictToCategory: this.oldDataSource.baseParams.RestrictToCategory
                    });
                }
    
                var ds = new Ext.nd.data.ViewStore({
                    proxy: new Ext.data.HttpProxy({
                        url: Ext.nd.extndUrl + 'SearchView?OpenAgent',
                        method: "GET"
                    }),
                    baseParams: baseParams,
                    reader: this.uiView.viewEntryReader,
                    remoteSort: false
                });
                
                
                this.uiView.reconfigure(ds, this.uiView.getColumnModel());
                var paging = this.uiView.getBottomToolbar();
                
                if (paging) {
                    paging.unbind(this.oldDataSource);
                    paging.bind(ds);
                }
                this.isSearching = true; // Set this so we don't create the search datastore multiple times
            }
            this.uiView.getStore().load({
                params: {
                    query: val,
                    count: this.searchCount,
                    start: 1
                }
            });
            this.field.triggers[0].show();
        }

Similar Threads

  1. Replies: 6
    Last Post: 23 Nov 2010, 12:57 PM
  2. problem grid search input css
    By pasblin in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 30 Mar 2009, 1:02 AM
  3. Search Attention Ticket & Edit Input Screen
    By egoicovic in forum Community Discussion
    Replies: 2
    Last Post: 30 Mar 2007, 2:43 PM

Thread Participants: 7

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