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 6533249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:06:08+00:00 2026-05-25T10:06:08+00:00

I want to fire the open root node event on my current working CellTree,

  • 0

I want to fire the “open root node” event on my current working CellTree, which now has the following behaviour:

@Override
    public <T> NodeInfo<?> getNodeInfo(final T value) {
        return new DefaultNodeInfo<Categoria>(
                (value instanceof Categoria) ? 
                        createBranchDataProvider((Categoria)value) :
                        rootDataProvider, 
                new CategoriaCell()
        );
    }

private AsyncDataProvider<Categoria> createRootDataProvider() {
        AsyncDataProvider<Categoria> dataProvider = new AsyncDataProvider<Categoria>() {
            @Override
            protected void onRangeChanged(HasData<Categoria> display) {
                AsyncCallback<Categoria[]> cb = new AsyncCallback<Categoria[]>() {
                    @Override
                    public void onSuccess(Categoria[] result) {
                        updateRowCount(result.length, true);
                        updateRowData(0, Arrays.asList(result));
                    }
                    @Override
                    public void onFailure(Throwable caught) {
                        Window.alert(caught.toString());
                    }
                };  
                rpcService.getCategorie(cb);
            }
        };
        return dataProvider;
    }

How can I fire that “onRangeChanged” event, to refresh my level-1 nodes?

What is my convenience method missing?

private void updateTree() {     
        TreeNode rootTreeNode = cellTree.getRootTreeNode();
        for (int i = 0; i < rootTreeNode.getChildCount(); i++) {
            rootTreeNode.setChildOpen(i, false);
        }
        // HOW TO REFRESH LEVEL-1 NODES?
    }
  • 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-25T10:06:10+00:00Added an answer on May 25, 2026 at 10:06 am

    The Level-1 nodes (I suppose you the mean below the root node) can not be refreshed the way you are doing it.

    You have to store the instance of your dataProvider for the level-1 nodes somewhere.
    Later when you refresh your list you have to update your stored dataProvider for your level-1 nodes.
    The nodes below the level-1 can be refreshed the way you are doing it. Because as soon as you close the level 1 nodes (that is what you are doing in the updateTree method) and the next time you open it getNodeInfo will be called and the updated Subcategories will be retrieved and displayed in the CellTree.

    UPDATE

    For refreshing the CellWidgets which is attached to AsyncDataProvider you will probably have to extend the AsyncDataProvider and either extract the RPC call to a getData() method which is called in the onRangeChanged() method or create an interface with a refresh method and implement it in your custom AsyncDataProvider which calls the protected onRangeChanged() method.

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

Sidebar

Related Questions

i want to fire an event manually using c#. For instance, say if i
I want to let TextBox control TextChanged event fire only when there are more
I want to have a generic event that I can fire that will take
i want to FIre the button Click event When My Window is Loaded.. How
I want to fire dragend event of a marker in another event say click
I want to fire an event when a new tab is created in Chrome.
I want to fire event in custom class written in Extjs 4. I created
I'm trying to create an extension which has a popup. I want to be
I want to Fire a selected Index change event of a grid view on
I want to replace fuzz word which has been written in URL taken from

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.