'jFormTK' Form State Processing:

This document is designed to describe the 'jFormTK' Form State processing.

. Forms…

A 'jFormTK Application consist of multiple forms. Each form SHALL be a Sub-Class of the 'FormForm' Class. Each Application Form SHALL be uniquely referenced by it's "Form ID" which contains the Form's Category, Sub-Category and Form Name parameters. In this document a 'jFormForm' Sub-Class shall be referenced as a 'appForm'.

NOTE: Each Application Form instance [appForm] contains an instance of the following 'jFormTK' Kernel Class's:

. Fields…

Each field of an 'appForm' Form SHALL be a 'jFormObject' Class instance. Fields MAY be individual fields or multiple fields of a 'jFormTK' Group. Each 'jFormObject' SHALL be uniquely identified by it's "Field ID" which contains it's Name, Group Name and Set Number. The Group Name and Set Number parameters are used to uniquely identify elements of a 'jFormTK' Group.

. Reference ID…

Each 'jFormObject' field of a 'jFormTK' Application is uniquely identified and addressable by it "Reference ID'' which consist of the concatenation of the "Form ID" and the "Field ID".

. Application Controls…

During the 'jFormTK' Application initialization the 'appForms' Class is instanced. This 'jFormTK' class is designed to hold the control parameters for each Application Form. A "Reference" to each 'appForm' instance is maintained by the 'appForms' Class. This Class also contains controls for the default Form Processing order.

. Form State…

There SHALL always be instance of the each 'jFormTK' Application Form. These Form instances are managed by the 'appForms' Class. In addition to containing a 'jFormObject' reference for each Form Field the 'appForm' instance is used to contain parameters required to service the 'jFormTK' Application "Forward Reference" and "'jFormObject' Breakpoint" features.

- Forward Reference:
If a 'jFormTK' Form uses the "Reference ID" to store a value in a field of a 'jFormTK' form with no Data Entered by the Application End User, then the value is saved in the 'appForm' instance until the Data Entry phase is processed.

The 'jFormForm' Sub-Class instance has the following states:

As each Form is displayed to the 'jFormTK' Application End User it's State is used as follows:

  1. No Data Entry
  2. If there is no file for the specified Application Form,
    Then the 'init' Method of the 'appForm' Class' is used to initialize the Form.

  3. No Data Entry w/ References [Forward and / or Breakpoint]
    If there is a file it is read from the Storage Device, e.g. the HDD.

    If the read file contains just the References,
    Then the 'init' Method of the 'appFormsClass' is envoked and the References are used to set the Forward Referenced Field Values and / or to set the 'appForm' Breakpoint Controls.
  4. Data Entry
    The file is read from the Storage Device and the following operations are performed:
    - the 'jFormObjects' Vector is established as a function of the saved 'jFormObject' Strings.
    - The Breakpoint Controls are set as a function of the saved Breakpoints String.