The FormManager bean is used to connect a form to a database file or record format. This is accomplished by associating JComponents in the form to database field names of the same name. The form can have one or more JComponents that have a single data element, such as:
FormManager makes use of RecordIOManager to provide record level access and manipulation. The record format of a database file is defined in the property recordIOManager. For more information about the RecordIOManager bean, see the related reference below.
Before a FormManager can associate a JComponent to a field, the following must be done:
FormManager automatically changes the attributes of JFormattedComponents that are associated with JComponent fields if these conditions are met:
The following table outlines the attributes that can be changed for the different field types:
Field type | Data type | Length | Decimal places |
---|---|---|---|
binary (B) | DATATYPE_ NUMERIC | no change | 0 |
character (A) | DATATYPE_CHARACTER | field length | 0 |
DBCS Either (E) | DATATYPE_CHARACTER | field length | 0 |
DBCS Graphic (G) | DATATYPE_ CHARACTER | field length | 0 |
DBCS Only (J) | DATATYPE_ CHARACTER | field length | 0 |
DBCS Open (O) | DATATYPE_ CHARACTER | field length | 0 |
date (L) | DATATYPE_ CHARACTER | field length | 0 |
float (F) | DATATYPE_ NUMERIC | If the data length of the JFormattedComponent is less than the number of decimal places of the field, then the length equals the number of decimal places plus 10. | field decimal places |
float(F) | DATATYPE_ CHARACTER | 20 | 0 |
hexadecimal (H) | DATATYPE_ CHARACTER | 2 times field length FormManager displays the hexadecimal representation of the field. |
0 |
packed decimal (P) | DATATYPE_ NUMERIC | field length | field decimal places |
time (T) | DATATYPE_ CHARACTER | field length (8 bytes) | 0 |
timestamp (Z) | DATATYPE_ CHARACTER | field length (26 bytes) | 0 |
zoned decimal (S) | DATATYPE_ NUMERIC | field length | field decimal places |
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.