multiSelectListBox

multiSelectListBox allows users to select multiple values from a scrollable list of items using checkboxes.

  • XML element: multiSelectListBox

  • Java class: JmixMultiSelectListBox

Basics

Use the itemsContainer or itemsEnum attribute is used to create a list of items:

<data>
    <collection class="com.company.onboarding.entity.Hobby" id="hobbiesDc"> (1)
        <fetchPlan extends="_base"/>
        <loader id="hobbiesDl">
            <query>
                <![CDATA[select e from Hobby e]]>
            </query>
        </loader>
    </collection>
</data>
<layout>
    <multiSelectListBox itemsContainer="hobbiesDc"/> (2)
</layout>
1 CollectionContainer for the Hobby entity.
2 multiSelectListBox gets hobbiesDc as an items container so that the list of hobbies displayed.
multi select list box basics

Handlers

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

See Also

See the Vaadin Docs for more information.