Entering content frame

Background documentation Data Binding of a Table Locate the document in its SAP Library structure

A table always receives its data from a context node – that is, the table property dataSource must be bound to a multiple context node.

At runtime, each node element of the node collection is a table row.

The number of table rows is identical to the number of node elements. The selected table rows correspond to the node selection. If the selection of the context node changes, the selected table rows also change. The lead selection plays an important role for the table cell that can be edited, because it is predefined by the lead selection of the context node. A table cell can only be edited if the lead selection corresponds to this cell and its table cell editor allows the editing of the cell content.

The table columns correspond to the context attributes and are described by the aggregation of TableColumn objects. They specify the number and order of columns as well as the headers and the width of the columns.

The content of a table cell to be displayed is provided by the table cell editor of the column. The table cell editor can only display the content in a table cell, so it does not make any difference if the content cannot be edited. You can use one of the following table cell editors:

·        Button, LinkToAction, LinkToURL:
UI elements that can be used to trigger events.

·        Caption, Image, TextView:
UI elements that can be used to display texts or graphics.

·        CheckBox, RadioButton, DropDownByKey:
UI elements that can be used to select elements of a specific value set.

·        DropDownByIndex

·        InputField:
This UI element allows the editing of any cell content.

The content to be displayed in a table does not have to be identical to the data source of the table. For example, two columns can display the same context attribute or two context attributes can be displayed in the same column.

Example

The properties of the table cell editors can be bound to the context according to the general rules of Web Dynpro data binding. You can bind the properties of the table cell editors to:

The appearance of the editor is different for both cases.

You can find an example of the coding for this behavior in Code Example of Table Display.

 

First Option:

 

This graphic is explained in the accompanying text

 

Second Option:

If you bind theInputField property readOnly to a root attribute, the value of this property applies to all cells in a column.

When binding to an independent node, the attribute value of the ith node element specifies the value of the table cell editor property in row i.

 

This graphic is explained in the accompanying text

  

  

 

Leaving content frame