Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
    languagejava
    themeConfluence
    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
    languagejava
    themeConfluence
    listSelect.focus();


  • Add entries - Manually adds entries to the XdevListSelect.

    Code Block
    languagejava
    themeConfluence
    listSelect.addItem("Eintrag 1");
    listSelect.addItem("Eintrag 2");

    Direct allocation of multiple entries.

    Code Block
    languagejava
    themeConfluence
    listSelect.addItems("Eintrag 1", "Eintrag 2", "Eintrag 3", "Eintrag 4");


  • Selected object - Returns the selected object (entity) - Example: category entity.

    Code Block
    languagejava
    themeConfluence
    BeanItem<Category> selectedItem = listSelect.getSelectedItem();
    Category category = selectedItem.getBean();

    or

    Code Block
    languagejava
    themeConfluence
    Category Category = (Category)listSelect.getValue();

    or - Delivers a list of all selected elements

    Code Block
    languagejava
    themeConfluence
    List<BeanItem<Category>> selectedItems = listSelect.getSelectedItems();


  • Remove elements - Removes all the elements from the XdevListSelect.

    Code Block
    languagejava
    themeConfluence
    listSelect.removeAllItems();


  • Select element - Automatic selection of an entry - Example: first entry.

    Code Block
    languagejava
    themeEclipse
    Collection<?> itemIds = listSelect.getItemIds();
    listSelect.setValue(((List<Category>)itemIds).get(0));


All XdevListSelect methodsMethods