Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

The XdevTwinColSelect consists of two list boxes with which you can create a selection list by simultaneously taking up one or more values in the right list box. Only the entries of the right list box are persisted. 

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


Important properties:
  • Auto query data - Automatically performs a database query and fills the entity connected to the UI component. Data that can’t be displayed will be lazily loaded (lazy-loading). The XdevLazyEntityContainer will be used as Data Container.

  • Entity -  Connects the assigned entity to the UI component.

    • Properties - Shows the attributes of the connected entity, specified here, in the UI component e.g. {%company}. You can also display multiple attributes, such as {%company}, {%carmodels}, {%price}. Thus, the potential settings made in the Entity Editor will be overwritten in Settings > Entity caption as well as in Properties > ItemCaptionValue.
    • Data - Instead of the default search strategy of Auto query data, it uses the query method findAll or a custom query method. findAll  transmits the entire query result and uses the  XdevBeanItemContainer as a data container. Lazy loading is not supported.
    • Hierarchy - Only for XdevTree.
  • ItemCaptionFromAnnotation - Displays attributes of the connected entity in the UI component. These attributes were globally defined in the Entity Editor in Settings > Entity caption, e.g. {%company}, {%carmodels}, {%price}.

  • ItemCaptionValue - Shows the attributes for the connected entity, specified here, in the UI component e.g. {%company}. You can also display multiple attributes, such as {%company}, {%carmodels}, {%price}.  Thus, any potentially set global setting in the Entity Editor will be overwritten in Settings > Entity caption

  • LeftColumnCaption - Sets text as caption for the left column.

  • Connected form - Connects the UI component (master) to the specified XdevFieldGroup (detail). 

  • Master component - Master component connected to the UI.

  • MultiSelect - Allows multiple selections.

  • Required - The form component is defined as a mandatory field. You need to make a selection from the available options, complete the field, or select the required option.

  • RequiredError - An error message that appears when a form component that is defined as a mandatory field is not filled out, selected or no selection has been made.

  • Rows - Defines the height of a form component in rows. A row is roughly equal to the height of a character. This setting is only relevant if Toolbox> Height is set to ? (Undefined) or you are using an AbsoluteLayout.

  • TabIndex - Defines the sequence in the tab index. The tab index defines the order of several UI components. These can be selected one by one by pressing the Tab key.

  • ReadOnly 
  • RightColumnCaption - Text for the caption of the right column.

  • Shortcut
Important events:
  • valueChange - Is triggered after changes to the content, mainly by adding or deleting characters, however only if the UI component loses the focus.

Databinding:
  • Data container (model) 
    • XdevBeanItemContainer - Standard data container. The allocation is set using the setContainerDataSource method.

      // Generates a new XdevBeanItemContainer 'productList'
      XdevBeanItemContainer<Product> productList = new XdevBeanItemContainer<Product>(Product.class);
       
      // Sets the XdevBeanItemContainer
      twinColSelect.setContainerDataSource(productList);
    • XdevLazyEntityContainer - RapidClipse exclusively uses this when the property Entity > Auto query data is selected.
Examples:
  • Selected object - Returns the selected object (entity): Example: category entity

    BeanItem<Category> selectedItem = twinColSelect.getSelectedItem();
    Category category = selectedItem.getBean();

    or

    Category Category = (Category)listSelect.getValue();

    or - Delivers a list of all selected elements

    List<BeanItem<Category>> selectedItems = twinColSelect.getSelectedItems()
  • Reset selection - Sets the selection to the initial state. This triggers a valueChange event.

    twinColSelect.clear();
  • Allocate focus - Allocates the focus on the XdevTwinColSelect. This can trigger a focus event, if necessary.

    twinColSelect.focus();
All XdevTwinColSelect Methods
  • No labels