Results 1 to 2 of 2

Thread: Paging won;t display the pagiSize I want

  1. #1
    Sencha User
    Join Date
    Jan 2017
    Location
    Mexico
    Posts
    7
    Vote Rating
    0
      0  

    Default Paging won;t display the pagiSize I want

    I'm trying to configure pageSize:2 but it just keep showing me all the data, first time trying this setup but no results, I've been researching for hours and no results, consulting similar threads but no answer. (BTW this is just a practice but i cant get it done please help)
    Page1_pageSize_keeps_showing_All_The_Data.jpgPage2.jpg

    List.js
    Code:
     
    Ext.define('SenchaSP.view.main.List', { //COMO SE VISUALISARA AL CARGAR EL SENCHA    extend: 'Ext.grid.Panel',
        xtype: 'mainlist',
        
        //requires: [
        //    'SenchaSP.store.VmEmployeesModel'
        //],
    
    
        title: 'Employees',
    
    
        bind: {
            store: '{employees}'       
        },
        tbar: [
            { xtype: 'button', text: 'Add Employee', iconCls: 'x-fa fa-plus', handler: 'onAddButtonClick' },
            { xtype: 'textfield', reference: 'findByName', fieldLabel: 'Name' },
            { xtype: 'textfield', reference: 'findByUser', fieldLabel: 'User' },
            { xtype: 'button', text: 'Search', handler: 'onClickFind' },
            { xtype: 'button', text: 'Clean Filter', handler: 'onCleanFilterClick', bind: { disabled: '{noFiltred}' } }
        ],
        columns: [
            { text: 'Employee ID',  dataIndex: 'employeeId' },
            { text: 'Name', dataIndex: 'name', flex: 1 },
            { text: 'Last Name', dataIndex: 'lastName', flex: 1 },
            { text: 'Position', dataIndex: 'positionName', flex: 1 },
            { text: 'Department', dataIndex: 'departmentName', flex: 1 },
            { text: 'Username', dataIndex: 'username', flex: 1 },
            { text: 'Email', dataIndex: 'email', flex: 1 }
        ],
        
        //dockedItems: [{
        //    dock: 'bottom',
        //    xtype: 'pagingtoolbar',
        //    reference:'pagingtoolbar',
        //    //bind: {
        //    //    store: '{employees}' //#1
        //    //},
        //    displayInfo: true,
        //    //displayMsg: 'Mostrar Empleados {0} - {1} of {2}',
        //    //emptyMsg: "No hay empleados que mostrar"
        //}],
    
    
        bbar: {        
            xtype: 'pagingtoolbar',
            pageSize: 2,
            displayInfo: true,
            bind: {
                store: '{employees}'
            },
            displayMsg: 'Displaying Surveys {0} - {1} of {2}',
            emptyMsg: "No Surveys to display"
        },
    
    
        listeners: {
            select: 'onItemSelected'
        }
    });
    ViewModel

    Code:
    Ext.define('SenchaSP.view.main.VmEmployeesModel', {    extend: 'Ext.app.ViewModel',    
        alias: 'viewmodel.employee',
    
    
        requires: ['SenchaSP.model.Employees' ],
        
        stores: {
            employees: {
                //AGREGAR EN MAIN EN REQUIERE Y CAMBIAR view: al VM que tenemos
                model: 'SenchaSP.model.Employees',
                remoteFilter: true,
                trailingBufferZone:1,
                leadingBufferZone: 2,
                pageSize:2,
                filters: [
                    {
                        property: 'employeeId',
                        value:''
                    },
                    {
                        property: 'name',
                        value:''
                    },
                    {
                        property: 'lastName',
                        value:''
                    },
                    {
                        property: 'positionName',
                        value:''
                    },
                    {
                        property: 'departmentName',
                        value:''
                    },
                    {
                        property:'username',
                        value:''
                    },
                     {
                         property: 'email',
                         value: ''
                     },
                    {
                        property: 'psearch',
                        value:''
                    }
                ],
                autoLoad: true
            }        
        }
    });

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,791
    Vote Rating
    290
      1  

    Default

    The pageSize config should be set on the store only. Also, your store seems to have buffered settings (leadingBufferedZone, trailingBufferedZone) but is not buffered.

    Lifecycle management for your web apps

Similar Threads

  1. Record not display according to paging
    By dhirajbharti in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 4 Aug 2008, 2:05 AM
  2. My paging not getting display correctly
    By shwetaNC in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Mar 2008, 2:12 AM
  3. display data in paging bar..pls help
    By tkm in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 5 Feb 2008, 2:02 PM
  4. How to display paging bar in Gridpanel?
    By wuyingtian in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 9 Jan 2008, 9:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •