A form wrapper is a Visual LANSA reusable part based on ancestor VF_AC038O.
Structurally, Visual LANSA form wrappers are generated like this:
Where:
A |
At the start of the code are a group of Define_com commands that define Visual LANSA visual controls that look like, and are positioned similarly to, the underpinning 5250 form. |
B |
Wrappers are much like command handlers, so they have uInitialize and uTerminate methods that are used in the same way. |
C |
Method uInitializeForForm is called the first time that a 5250 form is received. Typically, uInitializeForForm methods contain a bunch of DEFINESIMPLEFIELD and DEFINESUBFILECOLUMN method calls that define the relationship between the visual Visual LANSA controls in the wrapper and the field on the underpinning 5250 form. |
D |
Method SHOW_CURRENT_FORM is called in response to the underpinning 5250 form's arrival script executing the SHOW_CURRENT_FORM JavaScript function. In essence, SHOW_CURRENT_FORM executes every time the underpinning 5250 form arrives, allowing the wrapper to prepare its display accordingly. |
E |
Method RECEIVE_FORM_FIELD is executed (usually multiple times) when a 5250 form arrives. Each execution passes in the detail of a field on the arriving 5250 form so that it is mapped into the wrapper's version of the field. |
F |
Method RECEIVE_SUBFILE_CELL is executed (usually multiple times) when a 5250 form arrives. Each execution passes in the details of a single cell from a 5250 subfile so that it can be mapped into a cell in the Visual LANSA list's equivalent in the wrapper form. |
G |
For every simple field XXXXXXXXXXX on the wrapper form, a Changed event handler routine is generated. These routines send changed Visual LANSA wrapper field values back into the underpinning 5250 form. By using the RAMP Developer Panel, you can check that this process is happening correctly by swapping between the Show Screen Wrapper and Show Hidden 5250 Form buttons:
|
H |
For each Visual LANSA list XXXXXXXXXXXXX on the wrapper form, an ItemChanged event handler routine will be generated. These routines send changed Visual LANSA list cell values back into the underpinning 5250 form's subfile cells. |