Step 1. Create Your Real Command Handler

In this step, you will create a real command handler for the Details command.

1.   Start the Program Coding Assistant.

2.   In the list on the top left of the Program Coding Assistant window, select the iiiHR application and then the Details command handler.

3.   Select Basic Command Handler as the type of code.

The Basic Command Handler is the most commonly used assistant as you typically want to create a command handler that displays your data. You then customize the page to meet your specifications.

4.   Click the Next button.

5.   On the next page specify XEMPLOYEE as The physical file that most closely resembles this business object.

 6.  Next specify XEMPLOYID and XSURNAME as the fields on the instance list, and XEMPLOYID as the programmatic identifier of the instance list.


7.   Click Next.

8.   On the next screen drag and drop all the fields in the file to the list of fields to be shown on the command handler.

9.   Click Next.

10.   On the next page make sure that the option Include Default Save Button and Logic is selected.

11.   Click the Generate Code button.

 The next page, Generated Code, displays the source code for your command handler. You now need to create the component that will contain the code:

12.   Specify iiiCOM03 as the name of your component (where iii are your initials) and Details Command Handler as the description. Select the Snap In option to automatically compile and snap the command handler into the Framework.

13.   Click the Create button to create the component.

After a brief delay, a message indicating that the command handler has been compiled and snapped into the Framework is shown:

13.   Close the Program Coding Assistant and display the Visual LANSA editor. The command handler is open in the editor.

14.   Display the Source code of your component.

15.   Locate the SAVE_BUTTON.Click even. Note that it saves any changes you make to the fields on the Details command handler:

 16.   Locate the uExecute method. Notice that it calls the #avListManager.GetCurrentInstance method to get the key value of the currently selected item in the instance list and then uses this key value to fetch the details.