Show TOC

Procedure documentationPart 3: Creating and Editing the "Display View Locate this document in the navigation structure

Procedure

Creating a view creates a new folder in the object list of the Web Dynpro component. A second view is now added to this folder.

  1. To do this, select the Views folder in the object list and use the context menu to create an additional view called Display.

  2. Switch to the Context tab page.

  3. Now copy the context node data that you already created in the context of the SEARCH view to the context of the Display view:

    To do this, open the context node of the Context root node of the new DISPLAy view, and choose   Create Using Wizard   Copy Nodes of Different Context  .

  4. In the View/Controller Name line of the following dialog box, use the input help to select the SEARCH view and confirm the dialog box.

  5. In the following dialog box, the context of the SEARCH view is available for selecting a node. Select the DATA node by double-clicking on it.

  6. Then select the Context root node of the DISPLAY view and choose the context menu entry   Create   Node  .

  7. Create an additional node called flights, this time with the cardinality 0..n.

  8. Use the Create Using Wizard option of the context node again to define attributes from the SFLIGHT structure for this new node (see Part: 1, step 15). Choose the following fields: CARRID, CONNID, FLDATE, PRICE, and PLANETYPE.

  9. Save the view and switch to the Layout tab page.

  10. In the RootUIElementContainer, insert an element of type Table (context menu of the RootUIElementContainer) and enter an appropriate text for the table header: Select the CAPTION_1 entry in the element hierarchy of the container and enter the text in the text row in the properties table.

  11. In the element hierarchy, select the element of type Table and in its context menu select the Creating Binding... entry.

  12. On the following dialog, select Context so that you can select the required node.

  13. Choose the FLIGHTS context node and confirm this and the subsequent dialog.

    For each attribute of the context node, a column is created automatically in the table and the individual attribute was bound to the relevant column.

  14. Use the context menu of each individual column to add a corresponding column header, and enter an appropriate header text for each of the headers in the properties table.

    Save the view.

Result

The context attributes are now bound to the corresponding columns of the table in the layout.

You must now make sure that the context of this view gets the corresponding data from the SFLIGHT database table when it is displayed. For this you first have to maintain a cross-view context and also create the CARRID attribute there.

Continue with Part 4:Implementing the Data Transport.