'com.jFormTK' "pre Processor", "post Processor", "do Button" Description:
This document is designed to describe the Java Form Tool Kit [''com.jFormTK''] "pre Processor", "post Processor" and "do Button", features.
Pre Processor / Post Processor Description:The ''com.jFormTK'' consist of a JFormForm Sub-Class for each Application Form with a collection of JFormField instances that represent the fields of the Form. The "pre Processor" and "post Processor" capability enables the ''com.jFormTK'' developer to write Java "Code Snippets" that shall be executed in run-time before ["pre Processor"] and / or after ["post Processor"] a specific JFormField receives the focus in the JFormForm.
These "pre Processor" and "post Processor" operations are available for all JFormField "Active" Types, i.e. all but the JFormField "Label [_LField] Type.
To make use of the "pre Processor" or "post Processor" 'com.jFormTK' features the following Java code is required:
public void preProcessor(JFormField fld) {
} // End preProcessor Method
public void postProcessor(JFormField fld) {
} // End postProcessor Method
The respective preProcessObject or
postProcessObject OVERRIDE methods are provided a "Reference" to the
JFormField that requested a run-time pre/post Process operation. Generally, the
''com.jFormTK'' developer will use the JFormField getName() method to
determine what JFormField is to be processed.
For example: String name = fld.getName().
Each Java Code Snippet has access to any field [JFormField] of any Application Form [JFormForm Sub-Class] via the Java Form Tool Kit [''com.jFormTK''] "Dynamic Reference" feature. This ''com.jFormTK'' feature is implemented by the AppDB Class. See the "Dynamic Reference.doc" file for a complete description on the usage of the ''com.jFormTK'' function.
''com.jFormTK'' Buttons:
The 'com.jFormTK' System has the following collection of Buttons designed to make the Application Form more dynamic.
To make use of the "Action Button" feature the following Java code is required:
public void doButton(JFormField fld) {
} // End doButton Method
If a 'doButton' Object is required,
Then the Object is obtained from the host 'JFormField' instance via the following method
usage:
String myString = (String)aField.getDoButtonObject();
where aField is a 'JFormField" instance and the Object Variable is a String type.
NOTE:
The 'com.jFormTK' "pre Processor" and "post
Processor" operations are available for all of the 'com.jFormTK' JFormField
"Active" types, i.e. all JFormField types except the 'com.jFormTK' Label
[_LField] type.
For example it is possible to perform a "pre Processor" and "post
Processor" operation on a _BField, _QField, _PField, _AField of _DField JFormField
type. Doing so may make sense for a _Bfield object but "pre Processor" and
"post Processor" operations on any of the other above "Button" types
may be tricky because the 'com.jFormTK' Kernel is designed to handle their processing
"Under The Hood".
The doButton method processing is available only for "_BField" OR "_QField" JFormField types.
As in the Run-Time Assignment processing the "pre Processor" and "post Processor" 'com.jFormTK' features have "Recurrence" processing to be considered. By default, once a "pre Processor" and "post Processor" operation is performed it is removed from future consideration, i.e. it is generally a one time Run-Time processing operation.
However, this may not always be the requirement for a "pre Processor" and "post Processor" operation. Therefore, the 'com.jFormTK' enables the Application Developer to direct the 'com.jFormTK' Kernel to keep the "pre Processor" and "post Processor" "Active" by setting the "Recurrence" Flag to true. This is accomplished via the following code:
aField.setPreProcessRecurrence(true);
aField.setPostProcessRecurrence(true);
where 'aField' is the JFormField instance...