Show TOC

Step 6: Maintaining the Context of the Second ViewLocate this document in the navigation structure

Use

Just like in step 3, the context of the component controller is now made accessible to the context of the second view. A new node is created again in the view context and mapping is defined between this new node and the NODE1 node of the Component Controller context. The attribute of the view context is then bound to the TEXTOUTPUT layout element, just like in step 4.

Procedure

You are still displaying your second view.

  1. Switch to the Context tab page and ensure that the Workbench is in change mode.

  2. Open the context menu of the root node of the view context and create a new node.

  3. Enter a name for this node (such as VIEW2 ), confirm the dialog and Save your work.

  4. Now open the context menu of the new VIEW2 node and choose Defining Mapping .

  5. From the context of the Component Controller , select the NODE1 node by double-clicking on it.

    In this way, the MYNAME attribute is ready in the context of the second view to be bound to a layout element.

  1. Switch to the Layout tab page.

  2. Select the Text Output element in the hierarchy below the RootUIElementeContainer .

  3. Find the text entry in the properties table and click again on the corresponding button in the Binding column on the right-hand side of the table.

  4. Select the MYNAME attribute again by double-clicking on it.

  5. Choose Save .

Result

Your component now contains two views, whose contexts are bound to each other using the context of the Component Controller . As a result, the work on the layout or the contexts of your component is finished.

Step 7: Embedding the Views in a Window