Entering content frame

Procedure documentation Step 5: Designing the Second View Locate the document in its SAP Library structure

The second view is structured in a similar way to the first view. Only the INPUT element is replaced by an element of type TextView. All the same, the procedure below explains the individual steps again.

This graphic is explained in the accompanying text

Procedure

       1.      Double-click on the name of your second view in the view node of the object list. The Layout tab page of your view is displayed automatically again. Make sure that the Workbench is in change mode.

       2.      Open the context menu of the RootUIElementContainer and choose Insert Element....

       3.      The first element should display a text, so enter a suitable name (such as "TEXTOUTPUT") and choose TextView from the list of element types Confirm the dialog box.

       4.      Open the context menu of the ROOTUIELEMENTECONTAINER again and create a button with a suitable name (such as “BUTTON2”) in the same way.

The required layout elements of the second view are now available; next you create the two plugs that are required.

       5.      Switch to the Outbound Plugs tab page and enter the name of the new plug (such as “OUT1”) in the table.

       6.      Now switch to the Inbound Plugs tab page and enter the name of the new plug (such as “IN2”) in the table. Save your changes.

Now that both the layout elements and the required plugs have been created, all that is missing is the link between the BUTTON2 button and the OUT2 outbound plug.

       7.      Switch back to the Layout tab page and select the BUTTON2 entry in the element hierarchy below the ROOTUIELEMENTECONTAINER. In the table below the hierarchy, once again you have the option of maintaining the properties and linking the selected element.

       8.      First choose the text property and enter a suitable text (in this case “Back!”, for example) in the Value row.

       9.      Below the Events header, choose the OnAction row. You have to create another action for the OnAction event here, which calls the outbound plug of the view when the BUTTON2 button is clicked. Enter a name for the action in the dialog box (for example, GOTOOUT2), select the only available outbound plug, and confirm your entries.

   10.      Save your changes.

Result

In this step, you have created the layout of the second view of your application, and you have ensured the navigability of the view by creating plugs. Furthermore, you have linked both of these to each other by linking the BUTTON2 interface element to a navigation call to the outbound plug OUT2 of the view.

You now have to maintain a context for the second view as well.

Step 6: Maintaining the Context of the Second View

 

 

Leaving content frame