Some control types can load required data from the database themselves, assuming Database was selected as data source.
This reduces memory usage and the control can be displayed faster.
You can define actions to be run if a specified operation is applied to the collection data. Events can be triggered by the following.
Table 59: Overview of the operations used
|A single row was added to the collection.
|A single row was deleted from the collection.
A single collection data value was updated.
|A set of rows was added to the collection or deleted from it.
To define an event
- In the navigation view, select a module or component.
- In the definition tree view, mark the Events node and, in the context menu, select the Object in extension > Event handling menu item.
The view switches to Configuration (custom) and the new Insert subnode is selected. In Node editor, you can manage the following settings.
Table 60: Settings for event handling
|Enter the name for the event.
|Select one of the operations listed above.
|Select a collection in the option box. You can navigate to the selected collection using and apply further settings if necessary.
|A Control-ID is preset. You can overwrite this.
- Adjust any settings you need to and then click in the toolbar.
To define an expression-based event
- In the navigation view, select a module or component.
- In the definition tree view, mark the Events node and, in the context menu, select the Object in extension > Expression-based event menu item.
The view switches to Configuration (custom) and the new subnode is marked. In Node editor, you can manage the following settings.
- Open the SQL field of the Value* box using .
- Enter a value for the expression-based event and click Apply.
- Save with .
Before you can assign a collection to a component, you must prepare the custom component to make it suitable for the collection.
To do this, the component requires a "virtual collection", which you will find under the component’s Property node in the definition tree view. Collections are assigned in the "virtual collection".
"Virtual collections" defined on components are marked as compulsory or optional.
Compulsory "virtual collections" must be assigned to a location collection. This assignment is made where the component's usage is defined.
Before you assign a collection to a component, a node must be configured under Collection mapping
Collection mapping nodes are automatically assigned when a component reference is added. These nodes are added automatically but not configured. You configure them in Node editor. You can also add a Collection mapping node with the help of a wizard that you can call from the context menu. Another option for adding these nodes, is to add a single node that you can also access through the context menu of your component in the definition tree view.
NOTE: The following instruction steps are based on an example of a direct container reference.
To assign a collection to a component
- In the definition tree view, select the tab of the component or module, in which you want to use a Container type component.
- Mark a Container type node and, in the context menu, select the Component reference > Container (reference) menu item.
NOTE: If you add a component reference, the subnodes for collection mapping are automatically added. If more nodes are required for collection mapping, you can either add a Collection mapping type node yourself or by using the wizard. Other nodes may be added when you add a node with the wizard. You can delete these afterward.
- In the Note editor view, in the Identifier field, select the component you want to reference.
- In the definition tree view, select the Collection mapping node.
- In the Node editor view, select the relevant collection under Virtual collection.
- In the Map to local collection field, select a collection.
To define a virtual collection for a user-defined component
- Select a custom component to which you want to assign a collection.
This displays the object in the definition tree view.
- Mark the Properties node and, in the context menu, select the Virtual collection menu item.
This adds a new virtual collection in the definition tree view.
- In the Node editor, in the Identifier field, enter a name for the virtual collection.
NOTE: Use Object type and Cursor required to limit collection assignment further. Use Object type to ensure that the assigned collection must be a database collection of the given type. Use Cursor required to specify the point of the assigned collection which must be within an iteration above this.
To declare a configuration key for a module or a component
- In the definition tree view, click and open the Configuration node.
- In the context menu, select the Configuration section item.
- In the definition tree view, mark the new configuration section.
You can see that the new configuration section is selected with empty fields in Node editor.
- Enter the name for the new configuration section in the Identifier and Description fields in Node editor.
The configuration section is displayed with its name in the definition tree view.
- Mark the configuration section.
- In the context menu, select the Parameter item.
The new parameter is added under the configuration section.
- Mark the new parameter.
- In the Key field, enter a name for the configuration key.
- Example of a configuration key name: CCC_ConfigParm_Hyperview_HR
- In the Identifier field, enter the name from the Key field in the following way:
- Example for input: translate('#LDS#HR_Hyperview_Colums')
- In the Description field, enter the field to be display in the Settings... view under Details.
- Example for input: translate('#LDS#Choose Columns for HR-Hyperview')
- In the Type field, select the parameter type and edit the configuration key as in the sections about parameter types.
NOTE: You may have to edit further settings depending on which parameter type you selected.
Detailed information about this topic