Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default [CLOSED] 1.0.1 Ext.data.JsonStore "limit" param issue

    [CLOSED] 1.0.1 Ext.data.JsonStore "limit" param issue


    Hi guys,
    I'm having troubles trying to use the JsonStore component after upgrading to versione 1.0.1.
    In detail, I see in every single request, an extra param I never put in the configuration, and it's value is always fixed to 25.
    If I try to configure that param with another value, it is not overwritten, it is always 25.
    I post a small version of one of the ten JsonStore I use and and a screenshot of the result:

    PHP Code:
         var myStore = new Ext.data.JsonStore({
                
    storeId'myStore',
                
    remoteSorttrue,
                
    proxy: {
                    
    type'ajax',
                    
    url'myUrl',
                    
    actionMethods: {
                        
    read'POST'
                    
    },
                    
    extraParams: {
                        
    action'get-users'
                    
    },
                    
    reader: {
                        
    type'json',
                        
    totalProperty'totalCount',
                        
    root'list'
                    
    }
                },
                
    fields: [
                    { 
    name'id'type'string' },
                    { 
    name'name'type'string' }
                ],
                
    sortInfo: { field'name'direction'ASC'}
            }); 
    Any idea on this issue?
    Cheers
    Attached Images
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  2. #2
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Hi Andrea,

    This is coming from Store's paging functionality. If you set the AjaxProxy's pageParam config option to undefined it will no longer send that data:

    Code:
    var myStore = new Ext.data.Store({
        storeId: 'myStore',
        remoteSort: true,
        proxy: {
            type: 'ajax',
            url: 'myUrl',
            pageParam: undefined,
            actionMethods: {
                read: 'POST'
            },
            extraParams: {
                action: 'get-users'
            },
            reader: {
                type: 'json',
                totalProperty: 'totalCount',
                root: 'list'
            }
        },
        fields: [
            { name: 'id', type: 'string' },
            { name: 'name', type: 'string' }
        ],
        sortInfo: { field: 'name', direction: 'ASC'}
    });
    Note also that you don't need to use a JsonStore -these are really just a hangover from Ext JS 3. In Sencha Touch and Ext JS 4 the Store doesn't know about the format of the data that goes into it. All JsonStore does nowadays is provide you with a default AjaxProxy with a JSON reader/writer. As you're defining your own Proxy here anyway you can just drop down to Ext.data.Store.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  3. #3
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Thank you for the assistance edspencer you've been very clear!
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  4. #4
    Sencha User pcr's Avatar
    Join Date
    Jun 2009
    Posts
    183
    Vote Rating
    2
    pcr is on a distinguished road

      0  

    Default


    Thanks Ed and andreas for help and the clear explanation. I allready now about pageSize from a nice other Ext user mitchellsimoens.
    I now can go on.

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    62
    Vote Rating
    0
    slmd is on a distinguished road

      0  

    Default


    Hi !

    How do i do if i want to set this limit to a specific number below 25 for exemple? I've tried the following code but even though it takes in consideration the pageSize property it does render the complete Json elements which is actually something i don't expect.

    The json
    Code:
    {
    	"profile": [{
    		"firstname": "firstname1",
    		"lastname": "lastname1",
    		"age": "1"
    	},{
    		"firstname": "firstname2",
    		"lastname": "lastname2",
    		"age": "2"
    	},{
    		"firstname": "firstname3",
    		"lastname": "lastname3",
    		"age": "3"
    	}]
    }
    The app
    Code:
    Ext.setup({
    
    
        onReady : function() {
    
    
            var jsonLink;
            if (Ext.is.Desktop) {
                var jsonLink = 'http://127.0.0.1/app/data.json';
            }
    
    
            var TPL = "{firstname} {lastname}";
    
    
            Ext.override(Ext.plugins.ListPagingPlugin, {
                loadPreviousText : 'Previous Page',
                render : function() {
                    var list = this.list, targetEl = list.getTargetEl(), html = '', phtml = '';
    
    
                    if(!this.autoPaging) {
                        html += '<div class="x-list-paging-msg">' + this.loadMoreText + '</div>';
                        phtml += '<div class="x-list-paging-msg">' + this.loadPreviousText + '</div>';
                    }
    
    
                    this.firstEl = targetEl.insertFirst({
                        cls : 'x-list-paging' + (this.autoPaging ? ' x-loading' : ''),
                        html : phtml + Ext.LoadingSpinner
                    });
    
    
                    this.el = targetEl.createChild({
                        cls : 'x-list-paging' + (this.autoPaging ? ' x-loading' : ''),
                        html : html + Ext.LoadingSpinner
                    });
    
    
                    if(this.autoPaging) {
                        this.mon(targetEl.getScrollParent(), 'scrollend', this.onScrollEnd, this);
                    } else {
                        this.mon(this.el, 'tap', this.onPagingTap, this);
                        this.mon(this.firstEl, 'tap', this.onPreviousPagingTap, this);
                    }
    
    
                    this.rendered = true;
                },
                onPreviousPagingTap : function(e) {
                    if(!this.loading) {
                        this.loading = true;
                        this.list.store.previousPage();
                        this.firstEl.addCls('x-loading');
                    }
                },
                onListUpdate : function() {
                    if(!this.list.store) {
                        return false;
                    }
                    if(!this.rendered) {
                        this.render();
                    }
                    if(!this.autoPaging) {
                        if(this.list.store.data.length < (this.list.store.currentPage * this.list.store.pageSize)) {
                        } else {
                            this.el.appendTo(this.list.getTargetEl());
                            this.el.removeCls('x-loading');
                        }
                        if(this.list.store.currentPage == 1) {
                        } else {
                            this.list.getTargetEl().insertFirst(this.firstEl);
                            this.firstEl.removeCls('x-loading');
                        }
                    }
    
    
                    this.loading = false;
                },
                onScrollEnd : function(scroller, pos) {
                    if(pos.y >= Math.abs(scroller.offsetBoundary.top)) {
                        this.loading = true;
                        this.list.store.nextPage();
                    } else if(pos.y == 0) {
                        this.loading = true;
                        this.list.store.previousPage();
                    }
                }
            });
    
    
            var paging = new Ext.plugins.ListPagingPlugin({
                autoPaging : false,
                loadMoreText : "More...",
                loadPreviousText : "Previous...",
                pullRefreshText : "MAJ",
            })
    
    
            Ext.regModel('Profile', {
                fields : [{
                    name : 'firstname',
                    type : 'string'
                }, {
                    name : 'lastname',
                    type : 'string'
                }, {
                    name : 'age',
                    type : 'number'
                }]
            });
    
    
            var profileStore = new Ext.data.JsonStore({
                model : 'Profile',
                remoteFilter : true,
                pageSize : 1,
                //clearOnPageLoad: false,
                proxy : {
                    type : 'ajax',
                    url : jsonLink,
                    pageParam: 'page',
                    reader : {
                        type : 'json',
                        totalProperty: 'totalCount',
                        root : 'profile'
                    }
                },
                autoLoad : true,
            });
            //console.log(profileStore.load());
    
    
            var myList = new Ext.List({
                itemTpl : TPL,
                store : profileStore,
                plugins : [paging, {
                    ptype : 'pullrefresh'
                }]
            });
    
    
            new Ext.Panel({
                layout : 'card',
                fullscreen : true,
                items : [myList]
            });
        }
    })
    Thanks for your help

  6. #6
    Sencha User
    Join Date
    Jul 2009
    Posts
    16
    Vote Rating
    1
    e-mike is on a distinguished road

      0  

    Default


    @slmd: I don't know if it is the right method but I just overwrite using extraParams:

    http://docs.sencha.com/touch/2-0/#!/api/Ext.data.proxy.Server-cfg-extraParams

    e
    xtraParams: {
    limit: 10
    }

Similar Threads

  1. JsonStore requesting restful data with id in request Param, not url?! Help!
    By gordonjl in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 18 Oct 2010, 7:47 PM
  2. [CLOSED][3.??] Ext.data.Store param POST
    By globalab in forum Ext 3.x: Bugs
    Replies: 37
    Last Post: 4 Jul 2009, 6:22 PM
  3. [CLOSED][3.0RC1] Error in Ext.data.JsonStore
    By alayasf01 in forum Ext 3.x: Bugs
    Replies: 5
    Last Post: 4 May 2009, 8:10 AM
  4. [2.x][Closed]Bug in Ext.data.JsonStore cconstructor
    By mclerte in forum Ext 2.x: Bugs
    Replies: 1
    Last Post: 13 Jan 2009, 9:55 AM
  5. Limit on JsonStore data length for ComboBox?
    By cbg3 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 10 Dec 2008, 5:13 AM

Thread Participants: 4