listBox allows users to select a single value from a scrollable list of items.

  • XML element: listBox

  • Java class: JmixListBox


listbox can be populated with items from either an enumeration or collection of entities.

Use the itemsEnum attribute to directly specify the name of the enumeration class:

<listBox itemsEnum=""/>

In case of entities, first define a collection container and then pass its name to the itemsContainer attribute:

    <collection class="" id="citiesDc"> (1)
        <fetchPlan extends="_base"/>
        <loader id="citiesDl">
                <![CDATA[select e from City e]]>
    <listBox itemsContainer="citiesDc"/> (2)
1 CollectionContainer for the City entity.
2 citiesDc is set as an items container for the component.
list box basics


To generate a handler stub in Jmix Studio, use the Handlers tab of the Jmix UI inspector panel or the Generate Handler action available in the top panel of the view class and through the CodeGenerate menu (Alt+Insert / Cmd+N).


See Also

See the Vaadin Docs for more information.