Context
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 .
Procedure
- In change mode, double-click the name of your first view in the view node of the object list. The
Layout tab page of your view is displayed automatically.
- Open the context menu of the
RootUIElementContainer and choose
Insert Element... .
- The first element should display a text, so enter a suitable name (such as
Text Output ) and choose
TextView from the list of element types Confirm the dialog box.
- Open the context menu of the
RootUIElementContainers 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.The plugs that are required are created next.
- Switch to the
Outbound Plugs tab page and enter the name of the new plug (such as
OUT2 ) in the table.
- 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 with the
OUT2 outbound plug.
- Switch back to the
Layout tab page and select the
RootUIElementContainers entry in the element hierarchy below the
Button2 entry.
In the table below the hierarchy you have the option of maintaining the properties and linking the selected element.
- First choose the
text property and enter a suitable text (in this case
Back! , for example) in the
Value row.
- 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.
- Save your changes.
Results
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