VLF filters and command handlers:
Structurally all VLF-ONE and VLF-WIN filters or command handlers look something like this:
There are several important parts in any filter or command handler:
|
All filters and command handlers extend (i.e.: inherit from) a base class shipped with the Framework. Filters extend a class named #VF_AC007O (VLF-ONE) or #VF_AC007 (VLF-WIN) Command handlers extend a class named #VF_AC010O (VLF-ONE) or VF_AC010 (VLF-WIN). In both cases the base classes provide a set of pre-defined behavior to the command handler or filter.
|
|
All filters and command handlers can have an optional redefinable method named uInitialize. It is executed just once when the filter or command handler is being created. Typically you use this to fill in details on the form that the filter or command handler will display.
|
|
All filters and command handlers can have an optional redefinable method named uTerminate It is executed just once when the filter or command handler is going to being destroyed. Typically you use this to free up things that the filter or command handler uses.
|
|
Normally all command handlers have a redefined uExecute method. This method is invoked whenever the user executes the Framework command that is associated with the command handler. Filters do not have uExecute methods because there is no command associated with them. They simply display their user interface and then wait for the user to indicate what they want to do (e.g. Click the Search button). |
|
All command handlers and VLF-ONE filters can have an optional redefinable method named uActivate that executes when the user causes the command handler or filter is to be redisplayed (i.e.: activated). Use of this method is rare and specialized. Make sure you understand its purpose and timing before using. |
|
Most filters and command handlers also have their own unique event handling routines (EvtRoutine/EndRoutine command pairs) and methods MthRoutine (Mthroutine/EndRoutine) command pairs. This example shows "Click" event routines for two buttons named #Save_Button and #Transfer_Button. The logic inside these routines would define what happens when the respective buttons are clicked by the user. |
Writing VLF filters or command handlers is exactly like writing any other Visual LANSA reusable visual part, except that the Framework manages how, when and where your filter or command handler is created.