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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:00:20+00:00 2026-06-04T04:00:20+00:00

I need a ‘custom selection model’ for GWT CellTable. One of the columns in

  • 0

I need a ‘custom selection model’ for GWT CellTable. One of the columns in CellTable is a Checkbox column.

Basic rquirements (both work in solution below):
– Row click (not on checkbox), selects that row and un-selects all other rows.
– Checkbox selection should select/un-select that row only.

Following is the code I am using, but its very very slow. Any guidance would be appreciated.

final SelectionModel<T> selectionModel = new MultiSelectionModel<T>();
dataTable.setSelectionModel(selectionModel, 
            DefaultSelectionEventManager.createCustomManager(
                new DefaultSelectionEventManager.CheckboxEventTranslator<T>() {
                    @Override
                    public SelectAction translateSelectionEvent(CellPreviewEvent<T> event) {
                        SelectAction action = super.translateSelectionEvent(event);
                        if (action.equals(SelectAction.IGNORE)) {
                            selectionModel.clear();
                            return SelectAction.TOGGLE;
                        }
                        return action;
                    }
                }
            )
        );

Following is the code snipped for CheckColumn callback.

Column<T, Boolean> checkColumn = new Column<T, Boolean>(
    new CheckboxCell(true, false))
        {
            @Override
            public Boolean getValue(T t)
            {
                // Get the value from the selection model.
                return selectionModel.isSelected(t);
            }
        };
  • 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-04T04:00:21+00:00Added an answer on June 4, 2026 at 4:00 am

    I have put in a KeyProvider for the CellTable and its not slow anymore. 🙂

    ProvidesKey<T> keyProvider = new ProvidesKey<T>() {
        public Object getKey(T t) {
            return tip == null? null : tip.getId();
        }
    };
    dataTable = new CellTable<T>(PAGE_SIZE, keyProvider);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need a way for one service on a well-known Endpoint to return strings which
Need to design a simple one for school. More specifically a Moore FSM. Im
Need to port data in sql table I have a master table with columns
need a little help with this one. I have a form that I am
Need a GUI with many tabs (TabBarController and UITabBar) and one fullscreen view, e.g.
Need something simulat jcrop plucgin (link to example is here: http://publikz.com/one-more-task-rounded-selection-in-jquery/ ) but with
Need some help. I have a table with some columns..like name , phone etc...
Need some help understanding the difference between the success and ajaxSuccess events documented here
Need to choose optimal data structure for fast work with list of locations and
Need some help please with this error : TypeError : 'unicode' object does not

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.