Step 3 Complete the Skills Browser

VLF Windows Application Development

Step 3. Complete the Skills Browser

VFW084 – A  Business Object Browser and Detailer

1.  Switch to the reusable part iiiVFW18 (Employee Skills Browser) in the editor. In the Design view, select the panel RIGHT_PANEL. Use the Layout Helper tab and give this panel an Attachment layout manager by selecting the existing manager ATLM_1 in the drop down:

2.  Drop the reusable part iiiVFW19 into the center of the Panel RIGHT_PANEL. Use the Details tab to change its Name to SKILL_DETLS.

3.  Select the component SKILL_DETLS on the RIGHT_PANEL and use Details / Events to create a uSkillChanged event routine. Add logic to execute the BuildList subroutine.

4.  Select the SKILL_LIST list view on the LEFT_PANEL and create an ItemGotSelection event routine.

     Add logic to invoke the uShow method in SKILL_DETLS, passing employee number and skill code. Your code should look like the following:

Evtroutine Handling(#SKILL_LIST.ItemGotSelection) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Invoke Method(#SKILL_DETLS.ushow) I_Empno(#empno) I_Skill(#skilcode)
Endroutine

 

5.  On the Design tab, select the SKILL_LIST and use the context menu to add a Pop-Up Menu component.

     Enter New in the menu item displayed at the top of the Design tab and create a Click event for it.

6.  Complete the menu item Click event by adding code to invoke the uNew method in SKILL_DETLS passing employee number.

Evtroutine Handling(#MITM_1.Click)
Invoke Method(#SKILL_DETLS.uNew) I_Empno(#empno)
Endroutine

 

7.  Compile the reusable iiiVFW18.

8.  Execute your Framework, and ensure you can use the Skills 2 command handler for an employee to update, delete and create a new skill.

     At the moment this command handler has a very basic interface. In the next exercise you will make a number of improvements to it.