multiSelectComboBox allows users to choose one or more items from a drop-down list.

This component is similar to comboBox.

  • XML element: multiSelectComboBox

  • Java class: JmixMultiSelectComboBox


The drop-down list opens when the user clicks the field using a pointing device. Using the Up and Down keys or typing a character when the field is focused also opens the drop-down list.

multi select combo box basics

To create multiSelectComboBox connected to data, use the dataContainer and property attributes. The itemsContainer attribute is used to create a list of items:

    <instance class="" id="userDc"> (1)
        <fetchPlan extends="_base"> (2)
            <property name="hobbies" fetchPlan="_base"/>
        <loader id="userDl"/>
    <collection class="" id="hobbiesDc"> (3)
        <fetchPlan extends="_base"/>
        <loader id="hobbiesDl">
                <![CDATA[select e from Hobby e]]>
    <multiSelectComboBox dataContainer="userDc"
                         itemsContainer="hobbiesDc"/> (4)
1 InstanceContainer for the User entity.
2 Inline fetch plan of the entity instance located in the container.
3 CollectionContainer for the Hobby entity.
4 multiSelectComboBox gets hobbiesDc as an items container so that the list of hobbies drop-downs.

The component’s value returns a list of selected items.


Чтобы сгенерировать заглушку обработчика в Jmix Studio, используйте вкладку Handlers панели инспектора Jmix UI, или команду Generate Handler, доступную на верхней панели контроллера экрана и через меню CodeGenerate (Alt+Insert / Cmd+N).


See Also

See the Vaadin Docs for more information.