Repeat Mode Description:
This document is designed to describe the usage of the "repeatMode" parameter of the "com.jFormTK" addField Method when adding fields to a "JFormForm" Form. This parameter [repeatMode] is designed to control the "derived Content" of each JFormField that is added to a com.jFormTK.JFormFields Group".
What is a "JFormForm"?
There shall be a 'JFormField' for each Field of the Application Form. Each JFormField
instance is added to the JFormForm via the "addField" Method of the com.jFormTK
utility Abstract Class [Util]. The "addField" utility contains parameters that
describe where the specific JFormField shall appear on the associated Form
[JFormForm].
For example, the Professional Computer Solutions Survivors List PLUS Physicians Form has a 'Group' named 'Doctors' with JFormForm's for the name, phone, and specialty of each Doctor. The 'Group' Set Numbers are the default numeric values starting with "o". Therefore, the 3rd 'Doctors" Name is uniquely identified as "Doctors.name.2, i.e. a 'GroupName' of 'Doctors', a Field Name of 'name' and a 'SetNumber' of 2.
To accomplish the above, a com.jFormTK ""JFormFields Group" is established with a Group Name of "Doctors". The three JFormFields [name, phone, specialty] are then instanced and placed into the JFormForm using the "addField utility Method. To enable a variable number of Children, the "addField" method is provided the Group Name [Doctors] and a "Repeat Mode" as each JFormField that is added to the JFormForm.
The "Repeat Mode" is used to control how the com.jFormTK System shall default the content of the JFormFields when a new Group is added to the 'JFormForm'.
More about the JFormField Class!
Type 'T' [TextField]:
* = any other String is loaded into the new JFormField AS IS!
Type 'C' [Choice]:
"~P" = Load the choice the same as the 'Previous' [last] JFormField of the current JFormFrame "Group".
"NEXT" = Move to the next item in the JFormField Choice List.
"DOWN" = Move DOWN one Choice item in the JFormField Choice List.
"UP" = Move UP one item in the JFormField Choice List.
"~n" = Move to the 'nTH' item in the JFormField Choice object.
EXAMPLES:
CHOICE LIST = {"A", "B", "C", "D", "E"}
PREVIOUS CHOICE ITEM = "C"
TABLE:
"repeatMode" | Added Choice Item | REMARKS |
"~I" | "A" | |
"~P" | "B" | |
"NEXT" | "D" | |
"DOWN" | "D" | |
"UP" | "B" | |
"~1" | "D" | Same as "NEXT" or "DOWN". |
"~2" | "E" | Forward 2. |
"~-1" | "B" | Same as "UP". |
"~-2" | "A" | Backward 2. |
"~-3" | "E" | Backward 3, circular LOOP. |
"A" | "A" | Always set to "A" as the default. |
"F" | Soft Abort | A Development Time Soft Abort is presented until a recognized item is found |
Type X [Check Box]:
"~P" = Load the checkboxs with the same items as the 'Previous' [last] JFormField of the current jFormFrame "Group".
Null [""] OR one space [" "] = same as "~P" above, i.e. the previous Check Box Values
"string of matching Items" = always set the "
Added" Items in the associated Check Box as a function of the given "string Of Items".If all the items do not match the Check Box List items,
Then a Soft Abort is presented to the 'com.jFormTK' developer for their corrections.
EXAMPLES:
CHECK BOX LIST = {"A", "B", "C", "D",
"E"}
INITIAL CHOICE ITEMS = "A" and "B"
PREVIOUS CHOICE ITEMS = "A", "C", "E"
TABLE:
"repeatMode" | Added Check Box Item | REMARKS |
"~I" | "A" and "B" | |
"~P" | "A", "C", "E" | |
"" | "A", "C", "E" | |
" " | "A", "C", "E" | |
"D~F: | Soft Abort | Soft Abort because "F" is not in the current "Check Box List" |
"B~C~D" | "B", "C", "D" | Where ItemsDelimiter = "~"; |
Type R [Radio Button]:
"~I" = Load the radio button the same as the 'Initial' [first] JFormField of the current jFormFrame "Group".
"~P" = Load the radio button the same as the 'Previous' [last] JFormField of the current jFormFrame "Group".
Null[""'OR one space [" "] = same as "~p" above, i.e. the previous Radio Button Values.
"RIGHT" = Given the Previous JFormField Radio Button, move right
to the next item in the JFormField Radio Button set.
"LEFT" = Given the Previous JFormField Radio Button, move left to
the last item in the JFormField Radio Button Set.
"~n" = Move to the 'nTH' item in the JFormField Choice object.
"string with a recognized Item" = always set the "
EXAMPLES:
RADIO BUTTON LIST = {"A", "B", "C", "D",
"E"}
INITIAL RADIO BUTTON SELECTION = "B"
PREVIOUS RADIO BUTTON ITEM = "C"
TABLE:
"repeatMode" | Added Radio Button Item | REMARKS |
"~I" | "B" | |
"~P" | "B" | |
"RIGHT" | "D" | |
"LEFT" | "B" | |
"B" | "B" | |
"F" | "C" | Soft Abort because "F" is not in the current Radio Button List. |