Entering content frame

Object documentation Context Design in the Master/Detail Viewer

The two tables in the Master-Detail Viewer will be filled with data records that are saved in the context of the view controller. The (upper) master table displays a row for each customer, containing his or her name and address. The (lower) detail table displays the order records for the currently selected customer. We identify each single record with the purchase date, product name, product price, and currency name. 

This graphic is explained in the accompanying text

How do we declare the records displayed in the two tables Customers and Orders for Customers in the controller context of a view at design time?

To clarify this, consider the following graphic:

This graphic is explained in the accompanying text

The controller context of a view consists of an independent value node called Customer, with the cardinality (0-n), since several customer records are to be shown in the table. This value node contains a single value attribute called Name and two dependent value nodes called Address and Order.

The value node Address has a cardinality from 0-1, since a single address record (corresponding to a single node element of type Address) is assigned to each customer.  To display the addresses for all customers simultaneously at runtime, this inner value node must be declared as Non-singleton node. Otherwise, the Web Dynpro runtime environment will only have a single value node instance, in which the node element with the type Address for the currently selected customer is saved. To be able also to display the addresses for the other customers, the Web Dynpro runtime environment must create instances of several separate Address value nodes. 

This is not the case for the inner value node called Order. At runtime, you need only a single value node, which is filled with the order data records associated with the currently selected customer – that is, with the data in the Order node elements.

This graphic is explained in the accompanying text  Declare the context structure in the Context view of the Work view. (For information on how to do this, refer to Structure linkDeclaring a Controller Context of a View.)

  

  

 

Leaving content frame