Entering content frame

Background documentation Component Configuration Locate the document in its SAP Library structure

Using Component Configuration, you can control the behavior of each individual component within a Web Dynpro application. For each component, several records of configuration data can be created. This kind of data record contains two different types of attributes.

Implicit Configuration

Each UI element has a set of attributes defined by the framework. Their values are set when a view is designed. Therefore, almost every UI element has the attribute Visibility. In the View Editor of the ABAP Workbench, an application developer sets the value, for example, to yes. Within a special application of the component, precisely this UI element, however, should not be visible. The application developer then creates a configuration for the component in which the value for the attribute Visibility is set to no. When the respective application is called, it will also require the information as to which existing configuration data is to be used.

The value of the attribute Visibility is an example of a possible implicit configuration style. The attribute is preset by the Web Dynpro Framework and the value set by the application developer is edited automatically. There is no additional programming effort required by the component developer for implicit configuration.

Many (not all) f the attributes of UI elements can be overridden with the help of configuration data.

Explicit Configuration: The Configuration Controller Context

In addition to the implicit configuration of predefined attributes of UI elements, it is also possible to influence the appearance and behavior of a Web Dynpro component. These influences can be implemented through additional attributes in the context of a special custom controller – the Configuration Controller.

Note You can create any number of Structure linkCustom Controllers for a Web Dynpro component. Only one custom controller, maximum, can be specified as the configuration controller. To do so, select the relevant controller in the object list and open its context menu. Choose Set/Reset as Config.Controller. In the same way, you can set the controller back to a simple custom controller.

 

Therefore, you can define attributes in the context of the configuration controller. These are used to control the appearance of a screen in a view. This explicit configuration becomes clear through an appropriate example.

In your system, you will find the example component WDR_TEST_PERS_IMP_EXP in the package SWDP_TEST. The value to be set as of which the system should switch from one reference icon to the next can be configured by the application developer.  For this purpose, the two attributes CONFIG_LOW and CONFIG_HIGH have been created in the configuration controller context of this component. These two attributes set the limit value as of which occupancy with the icon is low (green square) or high (red circle). If the occupancy level is between the values, a yellow triangle will appear in the table.

In contrast to implicit configurability, such attributes must be created explicitly in the configuration controller context. Therefore, the processing of attributes must also be explicitly programmed by the application developer in a controller method of the component. In the example component WDR_TEST_PERS_IMP_EXP, the logic for evaluating the attributes is entered in the method WDDOINIT of the component controller. The storage of the attributes in the context of the configuration controller ensures that their values can be set or changed later on with the help of the component configurator.

 

Note When you are creating a node in the configuration controller context, Singleton nodes and recursion nodes are not allowed.

 
The Component Configurator

You start the component configurator as follows:

     In the object list of the workbench, choose a Web Dynpro component and select it.

     From the context menu of the component, choose the entry Create/Change Configuration. The system automatically opens a browser with the dialog window of the configurator. The mode Component Configurator is active and you enter a name for your new component configuration.

From the list of available functions, choose the entry Create. On two tab pages, you can set the values of the implicit and explicit attributes for your configuration. Save the component configuration and close the browser.

Note A new configuration will be saved only when it actually contains values. An empty configuration file that merely has a name is not stored.

Since the configurator is not part of the ABAP Workbench, but runs separately in the browser, the hierarchy of the object list in the workbench must be updated actively after completion of the creation or change procedure in a configuration.

This graphic is explained in the accompanying text

In this way, you can combine and store many different configurations for each component. In large projects, it will happen that the structuring and functions of the explicit configuration is implemented by other development groups as the actual content of the attributes through the help of the component configurator.

Processing values of context attributes can, as described above, be done by an application developer at design time with the help of the component configurator. The application developer, however, can additionally provide for having values changed by a user (personalization) or an administrator (customization). In the case of properties of the implicit configuration, the Web Dynpro framework provides all the required tools. For all explicitly created modification options, the application developer must, however, program the required dialog himself/herself (for more information on this, refer to the chapter Personalization).

 

 

Leaving content frame