Step 1. Create a Real Command Handler
VFW042 – Snap in a Real Command Handler
In this step you will create a real command handler for the Details command.
1. From the
menu, start the .2. Select the
command handler.3. If necessary select
as the platform.4. Select
as the type of code. This command handler, displays the fields you specify for the object selected in the instance list. It includes a button. You must complete the required update logic for this button.The
, is used with a . The commands defined for the business object must be and .The
, generates a command handler for the business object data as well as providing a list of records from a related file.5. Click the
button.6. Specify file name PSLMST as
.As before the code assistant will select the key(s) of the file and the first two fields from the file, which are suitable in this case.
7. Click the
button.8. Specify file name PSLMST in the
section.9. Click the
button.
10. Scroll down the list of fields. Select the following fields and use the
button to remove them:- STARTDTER
- TERMDATER
- MNTHSAL
11. Click the
button.12. Select only the
.
13. Click the
button.The generated code is displayed.
14. Specify iiiVFW06 as the name of the component and
as the description.15. Click the
button.16. After a few moments the
message will be displayed.17. Switch to the Visual LANSA editor.
18. Use the
tab to find the SAVE_BUTTON click event routine.Add an UPDATE statement to update group_by fields XG_HEAD in the file PSLMST. Your code should look like the following:
Update Fields(#XG_HEAD) In_File(pslmst) Val_Error(*next)
19. Compile your component.