Course 7: Use the lotus script API to publish attributes
Define other actions on the NSF component
Follow these steps to define actions for the NSF componentCode:
In Lotus Domino designer V8, enable ndforum. nsf. This Lotus Notes applicationProgramThe title is notes/Domino 6 and 7 Forum.
If necessary, switch to the Views list by selecting views in the design panel.
Select 2. authorthreaded view and press enter to open it in design mode. The screen should be like figure 35.
Figure 35. "2. authorthreaded" view refreshed in Lotus Domino designer V8
Select the objects tab.
Find and expand "2. authorthreaded (View )".
Select an onselect event.
Delete the % REM statement at the beginning of the onselect subroutine and the % end REM statement at the end. The onselect subroutine should be the same as the code shown in figure 6.
Figure 36. onselect subroutine after % REM and % end REM statements are deleted
In the onselect and globals event processing functions, the LotusScript statements and subroutines determine the subcategories of the currently selected users and calculate the number of documents for each subclass. This information is published as an attribute, which can be connected to other components.
Tip: the last statement of the onselect event processing function uses the attribute name defined earlier. If you use another property name when creating a WSDL file for ndforum. nsf, you must modify the property name in the script.
Save and close.
In this course, we use the LotusScript API to publish an attribute when selecting the top-level category in the view. Next, we will add an eclipse Tag Cloud component to the NSF-based Composite Application. The tag cloud component has defined actions and attributes, so it is easy to establish an event/Action relationship between it and other components.