1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    4
    Vote Rating
    0
    Martin_Arrowsmith is on a distinguished road

      0  

    Default Unanswered: Using Page Slider with AJAX json data in ExtJS 4

    Unanswered: Using Page Slider with AJAX json data in ExtJS 4


    Hello experts,

    I am having trouble getting my paging slider to work correctly with my ajax json data. The grid loads with all the data, instead of only the 10 elements at a time as specified in my "pageSize" parameter.

    The slider buttons still respond, and I get a "loading" mask, but the entire data is always loaded. Can someone point out what I'm doing wrong? I only want 10 at a time, not the entire data. The code is posted below.

    PHP Code:
    Ext.onReady(function(){

        
    Ext.define('Spyware', {
            
    extend'Ext.data.Model',
            
    idProperty'infection',
            
    fields: [
                {
    name'infection'},
                {
    name'lastseen'type'int'},
                {
    name'firstseen'type'int'},
                {
    name'hitsday'type'int'},
                {
    name'hitsweek'type'int'},
                {
    name'hitsweek'type'int'}
            ]
        });
        
    // Create data store for me.
        
    var weekStore Ext.create('Ext.data.Store', {
            
    model'Spyware',
            
    remoteSorttrue,
            
    pageSize10,
            
    autoLoadtrue,
                
    proxy: {
                
    type'ajax',
                
    url'weekdata.json',
                
    reader: {
                    
    root'week',
                    
    type'json'
                
    }
            }

        });

       
    //-- Now create grid

        
    Ext.create('Ext.grid.Panel', {
            
    title:'Sliding Pager',
            
    storeweekStore,
            
    columns: [{
                    
    id:'infection',
                    
    text'Infection',
                    
    sortabletrue,
                    
    dataIndex'infection',
                    
    flex1
                
    },{
                    
    text'Last Seen',
                    
    sortabletrue,
                    
    dataIndex'lastseen',
                    
    width75
                
    },{
                    
    text'First Seen',
                    
    sortabletrue,
                    
    dataIndex'firstseen',
                    
    width75
                
    },{
                    
    text'Hits Since Yesterday',
                    
    sortabletrue,
                    
    dataIndex'hitsday',
                    
    width75
                
    },{
                    
    text'Hits Last Week',
                    
    sortabletrue,
                    
    dataIndex'hitsweek',
                    
    width75
                
    }],
            
    renderTo'grid-example',
            
    stripeRowstrue,
            
    height:320,
            
    width:600,
            
    bbarExt.create('Ext.PagingToolbar', {
                
    pageSize10,
                
    storeweekStore,
                
    displayInfotrue,
                
    pluginsExt.create('Ext.ux.SlidingPager', {})
            })
        });

    }); 

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    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


    Sounds like you are using Ext JS 4.0.7 or older. 4.1.0 beta 1 seems to have fixed these issues.
    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
    Dec 2011
    Posts
    4
    Vote Rating
    0
    Martin_Arrowsmith is on a distinguished road

      0  

    Default


    Indeed I am. Glad I asked! Ill try this and get back.

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    4
    Vote Rating
    0
    Martin_Arrowsmith is on a distinguished road

      0  

    Default Updating wasn't successful

    Updating wasn't successful


    Hi,

    When I updated to the newer version, it still did not work. Any ideas if there is anything wrong with the code above ?

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    3
    Vote Rating
    0
    barun17 is on a distinguished road

      0  

    Default


    hi,

    Me too having the same issue, Suggest some solution

Thread Participants: 2

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..."