1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    4
    Vote Rating
    0
    fishbone is on a distinguished road

      0  

    Default Answered: Add pager to list in sencha MVC-example

    Answered: Add pager to list in sencha MVC-example


    Hi,

    how can I add a pager in a grid-panel if MVC-architecture is used? I copied the files from Ext-4.0/examples/app/simple and successfully ran the example.

    Then I added a paging-toolbar as bbar-attribute in 'AM.view.user.List' using two different methods:

    1.
    Code:
    Ext.define('AM.view.user.List' ,{
        extend: 'Ext.grid.Panel',
        alias : 'widget.userlist',
    
        title : 'All Users',
        store: 'Users',
    
        columns: [
            {header: 'Name',  dataIndex: 'name',  flex: 1},
            {header: 'Email', dataIndex: 'email', flex: 1}
        ],
        
        bbar: {
             xtype: 'paging',
             store: 'Users',
             displayInfo: false
        }
    });
    results in error "namespace is undefined"

    2.
    Code:
    Ext.define('AM.view.user.List' ,{
        extend: 'Ext.grid.Panel',
        alias : 'widget.userlist',
    
        title : 'All Users',
        store: 'Users',
    
        columns: [
            {header: 'Name',  dataIndex: 'name',  flex: 1},
            {header: 'Email', dataIndex: 'email', flex: 1}
        ],
        
        bbar: Ext.create('Ext.toolbar.Paging', {
             store: 'Users',
             displayInfo: false
        })
    });
    results in error "Store is undefined"

    Example is attached.

    Thanks in advance,
    Uli
    Attached Files
    Last edited by fishbone; 16 Aug 2011 at 3:46 AM. Reason: typo

  2. The xtype for a paging toolbar is pagingtoolbar, not paging. Worked for me when I changed it.

  3. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,344
    Answers
    498
    Vote Rating
    249
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    The xtype for a paging toolbar is pagingtoolbar, not paging. Worked for me when I changed it.

  4. #3
    Sencha User
    Join Date
    Oct 2010
    Posts
    4
    Vote Rating
    0
    fishbone is on a distinguished road

      0  

    Default


    @skirtle
    Where do you know this from? The xtype is said to be "paging" in the docs... Should I file a bug ticket?

    http://docs.sencha.com/ext-js/4-0/#/api/Ext.Component

  5. #4
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,344
    Answers
    498
    Vote Rating
    249
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    I got it from here:

    http://docs.sencha.com/ext-js/4-0/#/...toolbar.Paging

    Top of the page.

    You appear to be correct, there is a mistake. There's a special thread for reporting documentation bugs here:

    http://www.sencha.com/forum/showthread.php?135037

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar