Course 3: Define Lotus Notes actions for communication between components
Define actions on the Lotus Notes View
Follow these steps to define the logic associated with the NSF component:
In Lotus Domino designer V8, enable ndforum. nsf.
If necessary, switch to the View list by selecting views in the design panel.
Select 2. authorthreaded view and press enter to open it in design mode. If you click Refresh, the screen shown in Figure 12 appears.
Figure 12. 2. authorthreaded view refreshed in Lotus Domino designer V8
Select create-action to add a new action in this view. The action panel is opened, and the attribute box of the new action is displayed, as shown in Figure 13.
Figure 13. Basic tab of the Action property box
In the first tab of the attribute box, enter "selectperson" in the name field ".
Cancel the "include action in action bar" and "include action in Action menu" options.
In the last tab of the attribute box, select actselectuser in the composite Settings action name list, as shown in figure 14. The action list comes from the WSDL file created previously using the property broker editor feature.
Figure 14. Advanced Tab Of the Action property box
Close the attribute box.
In the action panel in the upper-right corner, click the created action selectperson.
Note: If the action panel is not opened in the form window, select View-Action pane to open it and select the action you just created.
On the Lotus Domino designer programmers panel, select the client and Lotus script options for this action, as shown in Figure 15. The client option may have been selected.
Figure 15. Click subroutine of selectperson action
In the click subroutine, enter the LotusScript shown in Listing 1.Code. The selectperson_action_for_ndforum.txt file providesSource code. You can copy the code from this file to the click subroutine.
Note: This Action Script creates a new object of the notespropertybroker class and uses the attribute published by another component to change the view to a category that matches the published value.
Listing 1. Code of the click subroutine of the selectperson action
Save the changes and close them.
an action has been added to the Lotus Notes view. When using this Lotus Notes view as the NSF component in the composite application Program , this component can use an attribute it connects, then, execute the actions defined in the LotusScript code.