Step 2 Add the avSignalEvent to the Employee Details Command Handler

Visual LANSA Framework

Step 2. Add the avSignalEvent to the Employee Details Command Handler

In this step you change the SAVE_BUTTON event in the Employee Details command handler.

1.   Locate and open the Employee Details command handler iiiCOM03.

2.   Display the Source tab.

3.   Locate the SAVE_BUTTON Click event.  Add the following code before the Endroutine:

 

#com_owner.avSignalEvent WITHID(EMPLOYEE_CHANGED) SENDAINFO1(#EMPNO) TO(FRAMEWORK)

 

 

 

You use the avSignalEvent method when there is an event you would like other components within the Framework to be notified about: 

  • You place the event id to be signaled in the WithID parameter and any alphanumeric or numeric values you want to pass in the SendAInfon or SendNInfon parameters, where n is 1,…,5.  In this example the event is EMPLOYEE_CHANGED and the employee number is the value to be passed.
  • By default the value of the To parameter is FRAMEWORK which means any active component in the framework will receive this signal and will need to test to see if it pertains to them.  If you know that the event only pertains to the business object in which this component resides, you should set the parameter To equal to BUSINESSOBJECT so that a very limited set of components are notified of this event.  Using this technique will improve performance of your application. For a mini filter you need to signal at FRAMEWORK level.

 

4.   Compile the command handler.