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.

The XdevListSelect is a form component and can be persisted via the XdevFieldGroup

Important properties:
  • Include Page
    Property Auto query data
    Property Auto query data
  • Include Page
    Property ConnectedForm
    Property ConnectedForm
  • Include Page
    Property Entity
    Property Entity
  • Include Page
    Property ItemCaptionFromAnnotation
    Property ItemCaptionFromAnnotation
  • Include Page
    Property ItemCaptionValue
    Property ItemCaptionValue
  • Include Page
    Property Master component
    Property Master component
  • Include Page
    Property MultiSelect
    Property MultiSelect
  • ReadOnly 
  • Include Page
    Property Required
    Property Required
  • Include Page
    Property RequiredError
    Property RequiredError
  • Include Page
    Property Rows
    Property Rows
  • Include Page
    Property TabIndex
    Property TabIndex

...

  • 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));


Alle All XdevListSelect Methodenmethods