Step 4. Complete Monthly Command Handler
VFW106 – Using a List Collection
1. Switch to the reusable part iiiVFW32 in the editor (
).2. In the #Selected_Employees.
view, drag and drop the form, iiiVFW33 onto the panel. This will create a for the component. Change its to3. Complete the
method to invoke the form's method, passing the list collection (with the name SELECTION).Your code should look like the following. New code is highlighted in red.
Mthroutine Name(SelectionChanged)
Define_Com Class(#PRIM_LCOL<#iiivfw33>) Name(#SELECTION)
Selectlist Named(#EMP_VIEW)
Continue If(*Not #EMP_VIEW.CURRENTITEM.SELECTED)
#SELECTION.INSERT( #EMPLOYEES<#EMPNO> )
Endselect
* Show the selected employees form
#Selected_Employees.uShow( #SELECTION )
Endroutine
4. Compile the reusable part iiiVFW32.
5. Execute the Framework as Designer.
6. Open the
dialog for the Reports business object.7. Select the
tab.8. Select the
action and plug in the command handler, iiiVFW32. Use the dialog, which will plug in using the Identifier.9.
the Framework.10. Select the
business object. The command handler will be displayed as this is a default command. Right click on the tab to display the context menu and select the command handler.A list of all employees should be displayed.
11. Hold down the Control key and click on a number of employees in the Monthly list view.
The
form should be displayed and show the fullname of all currently selected employees in its list view.12. Change the selected employees on the Monthly command handler and note that the
viewer is dynamically refreshed.