Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 652131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:14:20+00:00 2026-05-13T22:14:20+00:00

I have an Ext TreePanel which I’m trying to add some server-side pagination to.

  • 0

I have an Ext TreePanel which I’m trying to add some server-side pagination to. We’re using Ext 2.2.0.

We have a customized tree which only has two tiers. We are listing 25 items under the tree itself (the root?), but each item node can have an unlimited amount of children. I’m guessing these are the “leaf”s. The item nodes are using a custom uiProvider, as are all of the children.

I’ve added some images for prev/next page to the itemNodeUI and added handlers which updates the item node’s attributes with the pageNumber. The DataUrl php file grabs these attributes and basically appends LIMIT to the sql query.

Everything works as it should, except when you click on the next/prev images, the item node collapses. If you expand the node, everything is as it should be, but I either need the node to stay expanded, or have it automagically re-expand after load. I’ve tried using expand(), fireEvent('expand'), expandChildNodes, the whole nine yards. Nothing.

Here’s the function that’s called when clicking on the ‘Previous Page’ button:

    onPaginationPrevButtonClick: function(e,t) {
        var parentEl = Ext.get(t).findParentNode('.x-tree-node-ct', 10, false).previousSibling;
        var treeNodeId = parentEl.getAttribute('ext:tree-node-id');
        var treeNode = this.tree.getNodeById(treeNodeId);
        var currentPage = parseInt(treeNode.attributes.pageNumber);

        if (currentPage > 0) {
            treeNode.attributes.pageNumber = currentPage - 1;
        }

        treeNode.getLoader().load(treeNode);
    }

Another issue I’m having is that the itemNodeUI, which extends TreeNodeUI, is not being ‘refreshed’ when the above function is called. So the text which shows how many results are being shown doesn’t change from the first page. Is there a way to refresh this node as well and have it expand, without reloading the whole tree?

If there’s a better or easier way I should be doing this, I appreciate any input you have. I’m an Ext.NEWB, so pretty much everything I do is a ‘hack.’ 😉

Edit:

I’m almost embarrassed to admit this, but I was completely able to resolve the collapsing issue by using treeNode.reload() instead of re-load()-ing the loader itself. sigh…

treeNode.getLoader().load(treeNode);

should have been:

treeNode.reload();

I still do, however, need to figure out how to refresh the node itself so that the text showing the results, and the prev/next buttons, show correctly. I’ve tried using:

treeNode.parentNode.reload();

…but all that does is refresh the whole tree. I just want the itemNode itself to be updated. Any thoughts?

Many thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:14:20+00:00Added an answer on May 13, 2026 at 10:14 pm

    Well, I’ve pretty much just assigned every HTML element with a unique ID and am using Ext.get to update the css styles and innerHTML. It’s a pretty ugly hack-job, but it’s gonna have to do.

    Hopefully someone else can get something out of this though. Best of luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have defined a class which represents a tree structure GeographicalUnits = Ext.extend(Ext.tree.TreePanel, {
I have an EXT JS page which sends a form with some values. The
I'm using ExtJs 3.4 and I have a TreeGrid (Ext.ux.tree.TreeGrid) with a column model.
I have a dynamically populated Ext.tree.TreePanel. I can drag nodes from the tree and
I have a Ext.net GridPanel Pagination with Paging as: <ext:PagingToolbar ID=PagingToolbar1 runat=server PageSize=25 StoreID=GridStore
I am using Ext.Net 1.3 with ASP.NET 4.0 application. I have few Ext ComboBox
I have seen Ext.net's examples site in which each new page is added as
im trying to build a treepanel (or just a simple tree i just need
We are using treepanel in our application.The code is: var exStore = Ext.create('Ext.data.TreeStore',{ root
I have an Ext.navigation.View in which I have pushed a few views. Certain user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.