The XdevListSelect is a drop-down list from which the user can select a value. Multiple selections are possible. The drop-down list usually contains the values contained within a column of a database table.
...
Reset selection - Sets the selection to the initial state. . Dies löst ein valueChange Event ausThis triggers a valueChange event.
Code Block language java theme Confluence listSelect.clear();
Fokus setzen - Weist dem XdevListSelect den Focus zuSet focus - Allocates the focus to the XdevListSelect. This can trigger a focus event.
Code Block language java theme Confluence listSelect.focus();
Add entries - Manually adds entries to the XdevListSelect.
Code Block language java theme Confluence listSelect.addItem("Eintrag 1"); listSelect.addItem("Eintrag 2");
Direct allocation of multiple entries.
Code Block language java theme Confluence listSelect.addItems("Eintrag 1", "Eintrag 2", "Eintrag 3", "Eintrag 4");
Selected object - Returns the selected object (entity) - Example: category entity.
Code Block language java theme Confluence BeanItem<Category> selectedItem = listSelect.getSelectedItem(); Category category = selectedItem.getBean();
or
Code Block language java theme Confluence Category Category = (Category)listSelect.getValue();
or - Delivers a list of all selected elements
Code Block language java theme Confluence List<BeanItem<Category>> selectedItems = listSelect.getSelectedItems();
Remove elements - Removes all the elements from the XdevListSelect.
Code Block language java theme Confluence listSelect.removeAllItems();
Select element - Automatic selection of an entry - Example: first entry.
Code Block language java theme Eclipse Collection<?> itemIds = listSelect.getItemIds(); listSelect.setValue(((List<Category>)itemIds).get(0));