1. #1
    Ext JS Premium Member
    Join Date
    Feb 2011
    Posts
    21
    Vote Rating
    0
    mszukajt is on a distinguished road

      0  

    Default TreePaging toolbar

    TreePaging toolbar


    Hi all.

    If anybody is interested I've prepared the TreePaging toolbar.

    It can be used similar to grid Paging toolbar (I've based on its code and simply copied about 80% of code).

    The only difference is it requires the grid not the store passed as config.

    Config example in TreePanel:

    initComponent : function() {
    var me = this;
    me.dockedItems = [
    {xtype : 'treepagingtoolbar', grid : me, dock : 'bottom', displayInfo : true}
    ];
    me.callParent(arguments);
    },


    Paging is done per each node - not the whole tree. You can refresh selected node or whole tree (root node). I was inspired by Maxim Bazhenov's (Ext.ux.maximgb.tg) extension for ExtJs 3.

    There is required to overwrite AbstractStore and TreeStore classes with code in attachement to work properly. It contains some custom fixes which are described in http://www.sencha.com/forum/showthre...l=1#post664477 thread.

    toolbar.TreePaging.zip

    Do not hesitate to make any improvements, better codding, etc. if have time for it I am not a JavaScript programmer .

  2. #2
    Sencha User
    Join Date
    May 2010
    Posts
    6
    Vote Rating
    0
    awush is on a distinguished road

      0  

    Default


    I've implemented this, but there still seems to be a problem with duplicate nodes in the tree, which is causing the updateIndexes function in Ext.view.AbstractView to fail. Specifically, the property this.all.elements at that point, contains two copies of each node (6 in total), while the call to this.store.getRange() return only the three individual records.

  3. #3
    Sencha User
    Join Date
    May 2010
    Posts
    6
    Vote Rating
    0
    awush is on a distinguished road

      0  

    Default


    also, what is the format of the data expected for the store? Where is the "total" property expected?

  4. #4
    Ext JS Premium Member
    Join Date
    Feb 2011
    Posts
    21
    Vote Rating
    0
    mszukajt is on a distinguished road

      0  

    Default


    What version of ExtJS do you use? It has been tested with 4.0.6 and 4.0.7 only.
    And have you done all store (abstract and tree) classes overwrite?

    Data format is as for TreeStore, nothing special.
    New page request works as node collapse, subnodes remove and node expand with parameter (page). Request MUST return only subnodes of specified node (for given page) - not all tree. When request returns nodes which are in the tree already then you have duplicates. Maybe this is the case?

  5. #5
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    9
    Vote Rating
    1
    ewl2 is on a distinguished road

      0  

    Default


    this extension is not working properly with 4.1 Any plans to update it?

Thread Participants: 2

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