Lesson 6: Wire components in the composite application
Components can be loosely coupled by wiring properties to actions in one-to-one or one-to-many relationships. As the assembler, you define the wiring for a composite application through the Composite Application Editor (CAE) feature. The property broker functionality of the Lotus Notes V8 client is the runtime environment for the wiring and intercomponent communication.
Complete the following steps to form event/action relationships between your components:
- In Lotus Notes V8, choose File - Open - Lotus Notes Application to open the Customer Interests composite application you modified earlier. The composite application appears and displays the two components you added earlier.
- From the menu, choose Actions - Edit Application to start the Composite Application Editor feature.
- Select Notes Contacts View from the navigator on the left, and then right-click and choose Wiring. This opens the wiring panel and makes Notes Contacts View the source component allowing you to wire its properties to actions of other components. The Composite Application Editor wiring interface appears, as shown in figure 31.
Figure 31. The wiring interface displays the components located on the current composite application page
The wiring interface displays the properties for the component labeled source and the actions for any other components placed on the same page. When any one property in the source component is selected, actions that have matching namespace and datatype values display a visual that indicates wiring is possible as seen in figure 31.
- Select the Common name changed property in the Notes Contacts View component, which is the component labeled Source.
- Drag-and-drop the "Select User By Name" action listed in the "NDForum – Author Threaded View" component.
NOTE: As seen in figure 32, a blue arrow appears as you drag from the selected property.
Figure 32. Wiring a property to an action
As seen in figure 33, a dotted line indicates wiring between the property and action.
Figure 33. The wiring interface displays the property and its wired actions
- Click OK to save your wiring changes and close the wiring interface.
NOTE: The Lotus Notes ECL feature causes the Execution Security Alert dialog box to appear, prompting you that an application signed by Lukas Geiger/ZetaBank is attempting an operation. This is a feature of the Lotus Notes client. You can select the option "Start trusting the signer" to dismiss this warning. You are also prompted to create a cross certificate to the organization /ZetaBank. You may need to close and reopen the application.
- Choose File - Finished Editing, and click select Yes to leave the Composite Application Editor feature. This closes the Composite Application Editor and displays the updated composite application in the Lotus Notes V8 client.
TIP: Choose Show - Preview on Side to change the placement of the preview pane in the Lotus Notes Contact component to resemble figure 34.
Figure 34. The composite application in Lotus Notes V8 with the vertical preview pane for the Lotus Notes Contacts View
To observe the result of your wiring, select a row in the Lotus Notes Contacts View component. The NSF component from the NDForum application reacts and changes the row selection to the matching user name. The property is published from the Lotus Notes Contacts View component with each row selection you perform. The action you wired to this property executes and performs your defined logic, moving the row selection to the matching common name.
You have completed this lesson and used the Composite Application Editor feature to wire two NSF components into an event/action relationship by connecting a property to one or more actions. Earlier, you used Lotus Domino Designer V8 to specify the properties that would be published and actions that would be executed for the NSF components.