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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:57:39+00:00 2026-06-05T22:57:39+00:00

I have a CellTree which utilizes a MultiSelectionModel with CheckboxCells as part of a

  • 0

I have a CellTree which utilizes a MultiSelectionModel with CheckboxCells as part of a composite cell. That all seems to be working.

What I’m actually trying to do is to generate tabs in my interface for each item that can be selected in the tree. Sounds trivial, but I’m stumped as to how to get the MyData on a selectionChange.
The items need to remain selected so that if I unselect them later, the tabs are then removed again.

I need to be get the MyData for the just selected item in order to know what the contents of the tab should be.

        final MultiSelectionModel<TableLight> selectionModel = new MultiSelectionModel<TableLight>();
    selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {

        public void onSelectionChange(SelectionChangeEvent event) {

        }
    });

I feel like I’m totally missing the obvious. All I can do in the selectionChange event is to interrogate my selection handler to see what the selected set is. Is there a way I can attach a listener to a specific tree selection instead of a global, “something has changed” listener.

Any hints would be much appreciated.

  • 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-06-05T22:57:41+00:00Added an answer on June 5, 2026 at 10:57 pm

    Adding an extended selection model will get you the last selected element :

    gridSelectionModel = new MultiSelectionModel<MyData>(KEY_PROVIDER){
    
            public void setSelected(MyData myData, boolean selected) {
                super.setSelected(myData, selected);
                if (selected){
                    System.out.println("setSelected selected " + myData);
                    // call now some ui handler to use the last selected myData element
                }
            }
        };
    

    I hope this helps.

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

Sidebar

Related Questions

Have you ever tried working with a XAML file which contains thousand tons of
Have a string: myString = '<p>Phone Number:</p><p>706-878-8888</p>' Trying to regex out all HTML tags,
I have used CellTree in which I have used CompositeCell containing CheckBoxCell on each
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
Have a matrix report now that has Position, Hours and Wages for a location
**Have it working now. I forgot to populate the Array List. How embarrassing. I'm
Have a rather abstract question for you all. I'm looking at getting involved in
Have a bunch of WCF REST services hosted on Azure that access a SQL
I have a CellTree containing a list of organisations. In the Model, each parent
I'd like to make a custom CellTree that would use checkbox based cells (I

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.