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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:48:22+00:00 2026-05-30T06:48:22+00:00

I have a task to design a control of size ComboBox (GXT) with Multi-select

  • 0

I have a task to design a control of size ComboBox (GXT) with Multi-select feature. I tried to set CheckBoxListView using setView of ComboBox but did not seemed to work. Can anybody please guide me if there is any way using the GXT framework I can achieve this?

PS: I found a component called XComboBox in sencha forum (java class, source code) which works good, but cant be used as its under GNU GPL License

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-30T06:48:24+00:00Added an answer on May 30, 2026 at 6:48 am

    Thanks @smiletolead for your guidance, I found a solution by integrating Dialog with CheckBoxListView and TriggerField class.

    The complete code listing is..

    
    
        package com.ui.test.client;
    
        import java.util.List;
    
        import com.extjs.gxt.ui.client.data.ModelData;
        import com.extjs.gxt.ui.client.event.ComponentEvent;
        import com.extjs.gxt.ui.client.event.WindowEvent;
        import com.extjs.gxt.ui.client.event.WindowListener;
        import com.extjs.gxt.ui.client.store.ListStore;
        import com.extjs.gxt.ui.client.widget.CheckBoxListView;
        import com.extjs.gxt.ui.client.widget.Dialog;
        import com.extjs.gxt.ui.client.widget.form.TriggerField;
        import com.extjs.gxt.ui.client.widget.layout.FillLayout;
        import com.google.gwt.user.client.Element;
    
        public class MultiSelectComboBox extends TriggerField {
    
            private Dialog checkBoxListHolder;
            private CheckBoxListView listView;
            private ListStore store;
    
            private String delimiter = ",";
            private boolean readOnly;
    
    
            public MultiSelectComboBox() {
                store = new ListStore();
                listView = new CheckBoxListView();
            }
    
    
    
    
            @Override
            protected void onTriggerClick(ComponentEvent ce) {
                super.onTriggerClick(ce);
                if(readOnly) {
                    return;
                }
                checkBoxListHolder.setSize(getWidth(), 200);
                listView.setWidth(getWidth());
                checkBoxListHolder.setPosition(getAbsoluteLeft(), 
                        getAbsoluteTop() + getHeight());
                if(checkBoxListHolder.isVisible()) {
                    checkBoxListHolder.hide();
                }
                else {
                    checkBoxListHolder.show();
                }
            }
    
    
    
    
            @Override
            protected void onRender(Element target, int index) {
                super.onRender(target, index);
    
                checkBoxListHolder = new Dialog();
                checkBoxListHolder.setClosable(false);
                checkBoxListHolder.setHeaderVisible(false);
                checkBoxListHolder.setFooter(false);
                checkBoxListHolder.setFrame(false);
                checkBoxListHolder.setResizable(false);
                checkBoxListHolder.setAutoHide(false);
                checkBoxListHolder.getButtonBar().setVisible(false);
                checkBoxListHolder.setLayout(new FillLayout());
                checkBoxListHolder.add(listView);
                listView.setStore(store);
    
                checkBoxListHolder.addWindowListener(new WindowListener(){
    
                    @Override
                    public void windowHide(WindowEvent we) {
                        setValue(parseCheckedValues(listView));
                    }
    
                });
    
            }
    
    
    
    
            private String parseCheckedValues(CheckBoxListView checkBoxView) {
                StringBuffer buf = new StringBuffer();
                if(checkBoxView != null) {
                    List selected = checkBoxView.getChecked();
                    int index = 1, len = selected.size();
                    for(D c : selected) {
                        buf.append(c.get(listView.getDisplayProperty()));
                        if(index  getListView() {
                return listView;
            }
    
            public void setListView(CheckBoxListView listView) {
                this.listView = listView;
            }
    
            public ListStore getStore() {
                return store;
            }
    
            public void setStore(ListStore store) {
                this.store = store;
            }
    
            public String getDelimiter() {
                return delimiter;
            }
    
            public void setDelimiter(String delimiter) {
                this.delimiter = delimiter;
            }
    
            public boolean isReadOnly() {
                return readOnly;
            }
    
            public void setReadOnly(boolean readOnly) {
                this.readOnly = readOnly;
            }
    
    
        }
    
    

    The code has been explained here…
    http://bhat86.blogspot.com/2012/02/gxt-comobobox-with-multi-select-feature.html

    Thank you!

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

Sidebar

Related Questions

I have been given the task to design a database to store a lot
We have a vxWorks design which requires one task to process messages from two
I have task involving reading SAS .xpt files using .NET. For that I'm using
I have a task and I want to generate some code using the CodeDom.
I am using one DataGrid with templatecolumn of Asp:Label Control. In Design Page i
I want to ask about software design. I have a task, the view controller
I have been given the task to design a list of APIs to be
I have a task to design a SQL database that will record values for
I have task that involves creating the right design for the JSON string before
We are not using GKPeerPicker control. We are implementing custom UI. We have done

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.