Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.
Image Removed
Image Added

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.
Image Removed
Image Added
 6
6.  Next specify XEMPLOYID and XSURNAME as the fields on the instance list, and XEMPLOYID as the programmatic identifier of the instance list.
Image Removed
Image Added
 
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.
Image Removed
Image Added

9.   Click Next.

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

11.   Click the Generate Code button.

 The 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.Image Removed

Image Added

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

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:
Image Removed
Image Added

 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.
Image Removed
Image Added