Versions Compared

Key

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

Die XdevOptionGroup ist eine Auswahl-Komponente bestehend aus einer Radiobutton-Gruppe, welche nur die Selektierung eines einzelnen Wertes zulässt. Durch die Einstellung MultiSelect wird die XdevOptionGroup zu einer Checkbox-Liste, welche auch die Selektierung mehrerer oder aller Werte zulässt.  

Die XdevOptionGroup ist eine Formular-Komponente und kann via XdevFieldGroup persistiert werden.  

Image Removed Image Removed

...

The XdevOptionGroup is a selection component that consists of a radio button group. Only one value can be selected. When the MultiSelect option is selected, the XdevOptionGroup becomes a check box list from which the user can select multiple values.

The XdevOptionGroup is a form component and it can be persisted via the XdevFieldGroup.

Image Added Image Added

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
  • Shortcut
  • Include Page
    Property TabIndex
    Property TabIndex

...

Important events:
  • Include Page
    Event valueChange
    Event valueChange

...

Data binding:
  • Daten-Container (ModelData container (model) 
    • XdevBeanItemContainer - - Standard Daten-Container. Die Zuweisung erfolgt mit der Methode setContainerDataSourcedata container. The allocation is set using the setContainerDataSource method.

      Code Block
      languagejava
      themeConfluence
      // Generates a new XdevBeanItemContainer 'productList'
      XdevBeanItemContainer<Product> productList = new XdevBeanItemContainer<Product>(Product.class);
       
      // Sets the XdevBeanItemContainer
      listSelect.setContainerDataSource(productList);


    • XdevLazyEntityContainer - Wird ausschließlich von RapidClipse verwendet, wenn die Property Entity > Auto quer data selektiert ist: RapidClipse exclusively uses this when the property Entity > Auto query data is selected.
Examples:
  • Selektierung auslesen - Liefert das selektierte Objekt zurück Read selection - Returns the selected object (Entity) - Beispiel mit Example with "Product" -Entityentity

    Code Block
    languagejava
    themeConfluence
    BeanItem<Product> selectedItem = this.optionGroup.getSelectedItem();
    
    Product product = selectedItem.getBean();

    oder - Liefert eine Liste aller selektierten Elemente zurückor - Returns a list of all selected elements

    Code Block
    languagejava
    themeConfluence
    List<BeanItem<Product>> selectedItems = this.optionGroup.getSelectedItems();


  • Selektierung setzenSet selection

    Code Block
    languagejava
    themeConfluence
    Object idByIndex = this.optionGroup.getBeanContainerDataSource().getIdByIndex(0);
    
    optionGroup.setValue(idByIndex);


  • Selektierung zurücksetzen - Setzt die Selektierung auf den Ausgangszustand. Dies löst ein valueChange Event ausReset selection - Sets the selection to the initial state. This triggers a valueChange event.

    Code Block
    languagejava
    themeConfluence
    optionGroup.clear();


  • Einzelne Items enablen und disablen mit Enable and disable individual items with setItemEnabled()

    Code Block
    languagejava
    themeConfluence
    Object firstItemId = this.optionGroup.getBeanContainerDataSource().firstItemId();
    
    // disable item
    optionGroup.setItemEnabled(firstItemId, false);


    Code Block
    languagejava
    themeConfluence
    // enable item
    optionGroup.setItemEnabled(firstItemId, true);


  • Fokus setzen- Weist der XdevOptionGroup den Focus zu. Dies kann ggf. ein focus Event auslösenSet focus- Allocates the focus to the XdevOptionGroup. This can trigger a focus event, if necessary.

    Code Block
    languagejava
    themeConfluence
    optionGroup.focus();

...


All XdevOptionGroup

...

Methods