1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    26
    Answers
    1
    Vote Rating
    0
    arpho is on a distinguished road

      0  

    Default Answered: Baseparams in a store does not work

    Answered: Baseparams in a store does not work


    Hi, I have a grid with paging
    the strore I am using sends POST request to a file PHP, I need to filter my db, so in the proxy of my store I use
    Code:
    baseParams : { provincia:'TO'}
    for the moment I am usig 'TO' just for test, when it will be working, I' l put some variable, my problem is that the store does not send the parameter 'provincia', it puts only the parameters for the listing: START and LIMIT, what is wrong
    these is my store
    Code:
    var SpaStore = Ext.create('Ext.data.Store', {
        
        
            autoLoad: {start: 0, limit: myPageSize, provincia: 'to'},
            autoSync: true,
            
             model:'SPA',
             
            proxy: {
                type: 'ajax',
                url: spaQuery,
                actionMethods :{
                    read   : 'POST'
                },
                reader: {
                    type: 'json',
                    root: 'data',
                    totalProperty : 'totalProperty', 
                    baseParams : { provincia:'TO'}
                },
                writer: {
                    type: 'json'
                }
            },
            listeners: {
                write: function(postitStore, operation){
                    var record = operation.getRecords()[0],
                    name = Ext.String.capitalize(operation.action),
                    verb;
                    
                    record = operation.records[0];    
                    if (name == 'Destroy') {
                        
                        verb = 'Destroyed';
                    } else {
                        verb = name + 'd';
                    }
                  //  Ext.example.msg(name, Ext.String.format("{0} Postit id: {1}", verb, record.getId()));
                    
                }
            }
        });
    and my grid
    Code:
    var grid = Ext.create('Ext.grid.Panel', {
            store: SpaStore,
            stateful: true,
            stateId: 'stateGrid',
            dockedItems: [{
            xtype: 'pagingtoolbar',
            store: SpaStore,   // same store GridPanel is using
            dock: 'bottom',
            displayInfo: true,
            stripeRows:true,
            resizeble:true,
            draggable: true,
            
    
        }],
            columns: [
                {
                    text     : 'nome1',
                    flex     : 1,
                    sortable : false,
                    dataIndex: 'nome1'
                },
                {
                    text     : 'nome2',
                    width    : 1,
                    sortable : true,
                //    renderer : 'usMoney',
                    dataIndex: 'nome2'
                },
                {
                    text     : 'indirizzo',
                    width    : 75,
                    sortable : true,
           //         renderer : change,
                    dataIndex: 'indirizzo'
                },
                {
                    text     : 'comune',
                    width    : 75,
                    sortable : true,
                    //renderer : pctChange,
                    dataIndex: 'comune'
                },
                {
                    text     : 'provincia',
                    width    : 85,
                    sortable : true,
                    dataIndex: 'provincia'
                },
                /*{
                    xtype: 'tel1',
                    width: 50,
                    sortable : true,
                   
                    dataIndex:'tel1'
                }*/
            ],
            height: 350,
            width: 1200,
            title: 'SPA',
            renderTo: document.body,
            viewConfig: {
                stripeRows: true
            }
        });
    what I am doing wrong?
    any help is welkome, thanks in advance

  2. You must use the extraParams of the proxy instead. baseParams doesn't exists anymore

  3. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    You must use the extraParams of the proxy instead. baseParams doesn't exists anymore

  4. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    26
    Answers
    1
    Vote Rating
    0
    arpho is on a distinguished road

      0  

    Default


    I changed to extraParams
    it does not work

  5. #4
    Sencha User lucasguaru's Avatar
    Join Date
    May 2011
    Location
    Guarujá, Brazil
    Posts
    77
    Answers
    9
    Vote Rating
    2
    lucasguaru is on a distinguished road

      0  

    Default


    Code:
    thisGrid.getStore().getProxy().extraParams = {
        param1 : '',
        param2 : ''
    };
    thisGrid.getStore().load();

Thread Participants: 2

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