Multiselect dropdown

How to implement multiselect dropdown here

Hi,

There is no multiselect drop down component in CUBA, but you can integrate ComboBox Multi Select Add-on for Vaadin:
Vaadin Add-on Directory Follow our documentation on integrating Vaadin add-ons: Using a Third-party Vaadin Component - CUBA Platform. Developer’s Manual

I am trying with this but getting errors so can you please give me an example project.

What kind of errors do you get?

Regards,
Gleb

Which dependency I need to take stepper or vaadin-combobox-multiselect.
I tried with both but build failing

You need to add the dependency on vaadin-combobox-multiselect.

I am getting the following build error

error

Now, I am getting the below error
Loading inherited module 'com.keansa.keansacloud.web.toolkit.ui.AppWidgetSet’
Loading inherited module 'org.vaadin.addons.comboboxmultiselect.WidgetSet’
Loading inherited module ‘com.vaadin.v7.Vaadin7WidgetSet’
[ERROR] Unable to find ‘com/vaadin/v7/Vaadin7WidgetSet.gwt.xml’ on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
:app-web-toolkit:buildWidgetSet FAILED

You’re adding add-on version 2.0.1 which is compatible with Vaadin 8. For Vaadin 7 (which is used in the CUBA Platform) you need to add add-on version 1.2.2.

Do not forget to add org.vaadin.addons.comboboxmultiselect.WidgetSet as Inherited widgetset value.

Also, you will face the problem with compatibility of popupbutton add-on as comboboxmultiselect-add-on depends on the newer version. So you need to change generated dependency to looks like the follows:

compile('org.vaadin.addons:vaadin-combobox-multiselect:1.2.2') {
	exclude(group: 'org.vaadin.addons', module: 'popupbutton')
}

Regards,
Gleb

Thanks Gleb for your great help.
But Still unable to add this to entity editor screen.


public ComboBoxMultiselect hierarchies(MDMEASURES entity) { 
        List<String> list = new ArrayList<String>(); 
            list.add("test1"); 
            list.add("test2"); 
            list.add("test3"); 
            list.add("test4"); 
            //ComboBoxMultiselect comboBoxMultiselect = new ComboBoxMultiselect(); 
            comboBoxMultiselect.setInputPrompt("Type here"); 
            comboBoxMultiselect.setCaption("ComboBoxMultiselect"); 
            comboBoxMultiselect.addItems(list); 
            comboBoxMultiselect.select("test3"); 
        return comboBoxMultiselect; 
    } 

How can I add this to editor

Did you follow this guide, which describes steps from adding add-on dependency to using component within FieldGroup? If so, what kind of difficulties do you face?

Regards,
Gleb

Thanks Gleb… I followed the same but i did some mistake now i corrected it and it is working fine.

Hi Gleb,

While editing the values we are loosing the selected values.
I used comboBoxMultiselect.select(list); comboBoxMultiselect.setValue(set)
If i use comboBoxMultiselect.select(“text”); then text is selecting fine but if I use comboBoxMultiselect.select(list); then nothing is selecting.
Please help me here

Hi,
We realize the significance of integrating new components into the platform and do have support for adding them. However, this component is not supported by the out-the-box version of the CUBA Platform; consequently it will require extra time of dedicated support to investigate the subject. You can find more information here ([url=https://cuba-platform.com/services#consultancy]High productivity application development platform) and contact us via e-mail (info@cuba-platform.com) or contact form ([url=https://www.cuba-platform.com/contacts]High productivity application development platform) to proceed further.
Regards,
Gleb