Start of Content Area

Process documentation Data Binding of a Dropdown List Box and Radio Button Group  Locate the document in its SAP Library structure

Index Binding

This type of data binding enables you to bind a UI element property that represents a list to a context attribute of a node that consists of a data object group at runtime. The context provides the content to be displayed within the UI element and the selection of an element.

The context must have a node, which contains 0 to n values (cardinality=0..n). For this context node, you can specify one or more attributes that provide the node elements at runtime. For data binding, the property of the UI element that is to display the content is bound to the corresponding attribute.

Language dependency of the context content must be taken into account when programming.

There are no requirements for the object type in the value set, whereas key binding requires the object type of the key value pair to be of type String. For further information, refer to Code Examples of Data Binding.

Key Binding

This type of data binding is provided for data types that were specifically defined in the Java Dictionary or are created at runtime using the dynamic metadata API. The structure of the value set is predefined as a collection of key value pairs by the Web Dynpro Framework. The DropDownByKey UI element can be bound to a context attribute that is either of the type String or contains a String-based and simple data type.

The context provides the content to be displayed with the UI element, the corresponding keys and the selected key for an element.

The context can have any node. For this context node, you can specify one or more attributes that provide the node elements at runtime and that are assigned to a data type with a fixed value set (key value pair). The possible keys are the keys of this value set. The texts to be displayed are the corresponding values of these keys. The selected key is identical to the corresponding value of the attribute.

For data binding, the property of the UI element that is to display the content is bound to the attribute. For an example, refer to Code Example of Key Binding.

Note

We recommend that you bind every property of a UI element to be controlled dynamically by the Web application. At runtime, you should modify the value of the bound attribute instead of the property value. A UI element state should only be modified using the Web Dynpro context, because the Web Dynpro runtime environment is optimized for this variant. In addition, this type of data binding supports the separation of layout and data. This makes it easier to exchange UI elements at a later time.

  

  

 

 

End of Content Area