Codes Bank Opton
[Previous] [Main] [Next]

Codes Bank Option


There are currently five Visual components that JGuiGen can use that must have special information that is not included in the Edit Data Dictionary Screen. The screen to access the Codes Bank table appears in the COLUMN edit screen when you need it. You can also access in in the JGuiGen --> Maintenance menu.

The components that need additonal data are as follows:

·Checkboxes (for columns other than boolean - if available). Your company might want to use a check box for Char(1) fields and store a "Y" and "N" or "T" and "F" or a numeric column and store 1 and 0 for true and false.  

·ComboBoxes - A field might have a limited number of options that you want users to forced to choose between. The list of options and what should be stored in the SQL table to correspond to each option must be obtained from somewhere.  

·Editable ComboBoxes - this is similar to the ComboBox above except that the user can add options.  

·Radio buttons. - the number of buttons, what each should say and what should be stored in the SQL table to correspond to each button are stored in the Codes Bank.  

·Multiple Select ComboBox (JList). In this case a number of options are presented to the user in one scrolling list. They pick as many as they want. JGuiGen assumes that each option is stored in its own field. The Codes Bank is used to indicate the fields, the value to be stored if an option is selected, the value to selected if an option is not selected and the prompt the user sees in the scrolling list.  

Here is the screen you see when you choose the Codes Bank menu option:

data_dictionary_codesbank.png



Examples - If you look in the Internationalization screen and select "userlogdata" from the combobox at the top of the screen you will see examples of a 1) Radiobutton - code = gender, 2) Combobox - code = department, 3) JList- Multiple Selection ComboBox - code = skills and a 4) Checkbox - code = parttime. These are used in the UserDemo.javaj and the UserLogData.java files generaed by JGuiGen.

Here is a description of the columns in this table and how you fill them:

1. Select a Classname - the combo box at the top of the screen allow you to limit the codes shown in the scrolling list to one class (generated applicaiton).

2. Code Group - This is the Codes Bank code entered in the Edit Column Description screen. All of the rows with the same code make up the data for one component (a combobox, a set of radio buttons, etc.) An example is the code "Gender" that is used to indicate all of the records in this table used to describe the three Gender buttons (M/F/UK) in the UserLogData applicaiton. Note that is is not editable. A sample row is automatically generated and added to this table when you generate your application. You can duplicate a record to get as many as you need. You will note that the ADD button has been replaced with the DUP button for this application.

All Clases
- Some options - such as StandardYN can be used by lots of classes. Indicate with the checkbox and this option will be included automatically for all classes.

Sort Number - When you want the items in a list to always appear in a set order fill in this field. The item with the lowest number is show first and the highest number is shown last.

3. DatabaseValue - this is what is saved in the data base if this option is chosen.

4. Visual Value - this is what the user see. The fields are different for each type of Visual Component.

5. Dup Button - As noted above you cannot ADD rows. Select one with the Group Code you want and click on the Dup Button. You will get a new row that belongs to the same group.

Note that the various language fields are used to fill in the Visual Values for differnt languages (I18N).

·Checkboxes - Check boxes can have an associated text to the right or you can use JGuiGen standard label on the left side of each column for the text. Fill in the Visual Value if you want the text to the right of the checkbox. Leave it blank if you do not want the text. You need two records and they should have different Sort Numbers. The lowest one will have the "Selected" value in the DatabaseValue field (i.e. Y if you want your table to contain a Y if your checkbox is selected.) The seoond record will have the value to be stored in your table if the item is NOT selected. (i.e. N if you want your table to contain an N if your checkbox is NOT selected.)  

·ComboBoxes - You will have one record in the Codes Bank for each option to appear in your drop down combobox. The Visual Value is what the user sees and the Database Value is what is stored in your table. Leave the Database Value empty if you want to store the Visual Value in your table. For example your combox box might contain "Married", "Single" and "Divorced" You could put "M", "S", and "D" in the database Value fields or your could leave these fields blank and your table will contain the words "Married", "Single" and "Divorced".  

·Editable ComboBoxes - this is similar to the ComboBox above except that the DataBase Values must be blank. Since the user can add a new value and there will be no corresponding value of the table for that entry, there cannot be a database Value for any of the entries.  

·Radio buttons. - You will have one entry for each button. Place the name to appear in the button in the Visual Value Field and the value to be saved in your table when the button is pressed inthe Database Value field.  

·Multiple Select ComboBox (JList). This is the most complex of the components.  

   The Visual Value is still the same. This is what the user sees in a scrolling list of options.
The Database Value field is more complex. It most contain three pieces of information separated by vertial bars (|)
A column name in your table | the value to be place in the column if the corresponding option is selected | the "not select" value

In the Userlogdata application there are four skills used in a Multiple Selection Comboxbox.

The first column involved in the userlogdata table is skillcomputer. This should have a "Y" if it is selected and an "N" if it is not selected.
The record in the Codes bank has a Visual value = "Skill with Computers".
The database value is skillcomputer|Y|N

Check you spelling carefully. JGuiGen will notify you iff it can't find one of the columns in your table.