Die XdevTwinColSelect besteht aus zwei Listboxen, mit der man eine Auswahlliste erstellen kann, indem man einzlene oder mehrere Werte gleichzeitig in die rechte Listbox übernimmt. Persistiert werden nur die Einträge der rechten Listbox.
Die XdevTwinColSelect ist eine Formular-Komponente und kann via XdevFieldGroup persistiert werden.
...
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:
Include Page Property Auto query data Property Auto query data Include Page Property Entity Property Entity Include Page Property ItemCaptionFromAnnotation Property ItemCaptionFromAnnotation Include Page Property ItemCaptionValue Property ItemCaptionValue Include Page Property LeftColumnCaption Property LeftColumnCaption Include Page Property ConnectedForm Property ConnectedForm Include Page Property Master component Property Master component Include Page Property MultiSelect Property MultiSelect Include Page Property Required Property Required Include Page Property RequiredError Property RequiredError Include Page Property Rows Property Rows Include Page Property TabIndex Property TabIndex - ReadOnly
Include Page Property RightColumnCaption Property RightColumnCaption - Shortcut
...
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 setContainerDataSource Standard data container. The allocation is set using the setContainerDataSource method.
Code Block language java theme Confluence // Generates a new XdevBeanItemContainer 'productList' XdevBeanItemContainer<Product> productList = new XdevBeanItemContainer<Product>(Product.class); // Sets the XdevBeanItemContainer twinColSelect.setContainerDataSource(productList);
- XdevLazyEntityContainer - Wird ausschließlich von RapidClipse verwendet, wenn die Property Entity > Auto query data selektiert ist RapidClipse exclusively uses this when the property Entity > Auto query data is selected.
Examples:
Selektiertes ObjektSelected object - Liefert das selektierte Objekt zurück (Entity) - Beispiel mit Category Entity Returns the selected object (entity): Example: category entity
Code Block language java theme Confluence BeanItem<Category> selectedItem = twinColSelect.getSelectedItem(); Category category = selectedItem.getBean();
oderor
Code Block language java theme Confluence Category Category = (Category)listSelect.getValue();
oder - Liefert eine Liste aller selektierten Elemente or - Delivers a list of all selected elements
Code Block language java theme Confluence List<BeanItem<Category>> selectedItems = twinColSelect.getSelectedItems()
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 language java theme Confluence twinColSelect.clear();
Fokus setzen - Weist dem XdevTwinColSelect den Focus zu. Dies kann ggf. ein focus Event auslösenAllocate focus - Allocates the focus on the XdevTwinColSelect. This can trigger a focus event, if necessary.
Code Block language java theme Confluence twinColSelect.focus();
...
All XdevTwinColSelect
...