Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: [2.2]Ext.ux.tree.PagingTreeLoader

  1. #11
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    110

    Default

    Step through the showToolbar function in the pagingtreeloader, see what F has:

    Code:
     if (!F.isLoaded) 
            {
                return;
            }
            
            if ((F.isLeaf() || !F.isLoaded()) && E !== true) 
            {
                this.pagingTreeToolbar.hide();
                return
            }

  2. #12

    Default

    Going through that function does not hide the toolbar as those conditions are not met.
    Please refer the snapshot
    Attached Images Attached Images

  3. #13

    Default

    Do we need to override the treemouseOverPlugin provided by Animal. I saw that it is already included in the main PagingTreeLoader.js

  4. #14
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    110

    Default

    Should work without it. Can you post the code or a stripped down example?

  5. #15

    Default

    Actually I am using tree inside a complex layout. So it won't be easy for you to debug through that. I will try to mimic the same in a prototype and let u know. In the mean time if you have any sample working code any where, can you please post that.

    Thanks

  6. #16
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    110

    Default

    Try this. Put it in the examples/tree directory. Root will get a toolbar once it loads.
    Attached Files Attached Files

  7. #17

    Default

    Thanks SuperDuke,

    Your example is working fine. But when I tried to get it work in my scenario it is not working. I tried to modify your html only to mimic my scenario.Please refer the attached file. My tree panel, along with a grid on the right hand side, is inside a panel. This panel is inside a Window.

    What I noticed that pagingTreeToolbar is rendered in document.body. So it might be due to this it is not visible while we hover the mouse. Can't we specify toolbar to render inside treePanel (e.g. top/bottom toolbar etc..)
    Attached Files Attached Files

  8. #18
    Sencha User
    Join Date
    Apr 2009
    Location
    China
    Posts
    8

    Default How to get the Parameter of start and limit?

    SuperDuke:
    How are you! I tried to get the Parameter("start","limit") at Server,but the value is null?
    Please tell me why and how to use the remote ?
    My code is like this

    var root = new Ext.tree.AsyncTreeNode({
    text:'HEADOFFICE',
    expanded:true,
    id:'0'
    });
    /*var loader = new Ext.tree.TreeLoader({
    baseAttrs:{cust:'client'},

    dataUrl:'/apollo/back/Companyaction_getallcompanyinfos.action'
    });*/
    var loader = new Ext.ux.tree.PagingTreeLoader({ TreeLoader
    dataUrl:'/apollo/back/Companyaction_getallcompanyinfos.action',
    pageSize:10,
    enableTextPaging:true,
    pagingModel:'remote', //local is client,remote is server
    params:{start:0,limit:10} //the paramter
    });

    loader.on("beforeload",function(treeloader,node)
    {
    treeloader.baseParams = {
    id : node.id,
    fzr: node.attributes.fzr
    };
    },this);

    var tree = new Ext.tree.TreePanel({
    plugins: new Ext.ux.tree.TreeNodeMouseoverPlugin(),
    loader:loader,
    title:'Company Info',
    width:280,
    autoHeight:true,
    autoScroll: true,
    height:400,
    tbar:[
    {text:'add',tooltip:'addinfo',iconCls:'add',handler:addcompany}
    listeners: {
    'render': function(tp){
    tp.getSelectionModel().on('selectionchange', function(tree, node){
    var el = Ext.getCmp('details-panel').body;
    tpl.overwrite(el, node.attributes);

    })
    }
    },
    root:root
    });

  9. #19
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    110

    Default

    Hi liqingzhu, override the getParameters method for the loader to include parsing the node.attributes.pagingInfo and appending to the buffer.

  10. #20
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    110

    Default

    binod dokania, the toolbar is rendered but needs a high z-index to be shown on top of the other components. When I set the z-index:15000, the toolbar shows on top of the window.

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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