Configure Field Drop-down Labels - SuperWEB2
When you are selecting fields to add to a table, if you click the arrow to the right of a field, SuperWEB2 displays a drop-down box that allows you to quickly select all values from that field at a particular level in the hierarchy.
For example, here the drop-down box allows you to select all the values from the Area field at the State, State Sub-Division, State Suburbs, or Postal Codes levels:
You can define the labels that will appear in this drop-down list for each value set in your database. If you do not define the labels, SuperWEB2 will display the value set labels that were defined in SuperCHANNEL when the database was created .
You can also change the text in the first line, if you wish. By default, this reads Select all at level.
Configure Value Set Labels
To configure the value set labels, you first need to find the value set IDs. You can do this in SuperADMIN, as follows:
-
Use the command
cat <database_id> fields
to get a list of fields in the database. For example:CODE> cat bank fields [ Summation Field : 'Customers' ] [ Summation Field : 'Customer Profit' ] [ Summation Field : 'Accounts' ] [ Summation Field : 'Account Profit' ] [ Summation Field : 'Average Account Balance' ] [ Field Group: 'Customers' ] [ XTAB Field : 'Age' ] [ XTAB Field : 'Age Groups' ] [ XTAB Field : 'Gender' ] [ XTAB Field : 'Marital Status' ] [ XTAB Field : 'Occupation' ] [ XTAB Field : 'Area' ] [ XTAB Field : 'Customer Mail Indicator' ] [ XTAB Field : 'Individual \ Company' ] [ XTAB Field : 'Customer Open Calendar Date' ] [ XTAB Field : 'Customer Open Financial Date' ] ...
-
Then, for each field, use the command
cat <database_id> <field>
. SuperADMIN will display details of the field's value sets. For example:CODE> cat bank Age [ XTAB Field : 'Age' ] [ ID : 'SXV4__Retail_Banking__F_Customer__Age_FLD' ] [ Value Set : 'SXV4__Retail_Banking__C_Age' ] > cat bank Area [ XTAB Field : 'Area' ] [ ID : 'SXV4__Retail_Banking__F_Customer__Area_FLD' ] [ Value Set : 'SXV4__Retail_Banking__C_State' ] [ Value Set : 'SXV4__Retail_Banking__C_Geography_2' ] [ Value Set : 'SXV4__Retail_Banking__C_Geography_1' ] [ Value Set : 'SXV4__Retail_Banking__C_Geography_0' ]
In this example, the
Age
field has a single value set (SXV4__Retail_Banking__C_Age
), while theArea
field has value sets at the four levels of the hierarchy.The format of the value set name returned in SuperADMIN is:
CODE<database_type>__<database_name>__<valueset_id>
In the example above, the value set IDs are therefore
C_Age
,C_State
,C_Geography_2
,C_Geography_1
, andC_Geography_0
. These are the IDs that you need to define the labels.
Once you have all the value set IDs, you need to edit the file <tomcat_home>\webapps\webapi\WEB-INF\classes\schemaValueSetNodeLabels.properties.
There may be multiple copies of this file for different languages and locales, with names like schemaValueSetNodeLabels_en.properties, and schemaValueSetNodeLabels_en_AU.properties. You need to make these changes in all versions of the file. The properties file that is used will depend on the language settings in the end user's web browser and the set of supported locales defined in the faces-config.xml configuration file (see Multilingual and Localisation Support - SuperWEB2 for more information about localisation and how SuperWEB2 uses the properties files).
Make a backup copy of this file before making any changes.
For each value set ID, you need to add a label definition in the following format:
<valueset_id>=<label_text>
For example:
C_Age=Age
C_State=State
C_Geography_2=State Sub-Division
C_Geography_1=State Suburbs
C_Geography_0=Postal Codes
Once you have added labels for all the value sets in your database, save your changes to the file and restart Tomcat (or the SuperWEB2 Service if using our SuperSTAR Suite).
Change the "Select all at level" Text
If you want to change the "Select all at level" text, you do this by editing the file <tomcat_home>\webapps\webapi\WEB-INF\classes\common_labels.properties
There may be multiple copies of this file for different languages and locales, with names like common_labels_en.properties, and common_labels_en_AU.properties. You need to make these changes in all versions of the file. The properties file that is used will depend on the language settings in the end user's web browser and the set of supported locales defined in the faces-config.xml configuration file (see Multilingual and Localisation Support - SuperWEB2 for more information about localisation and how SuperWEB2 uses the properties files).
Make a backup copy of this file before making any changes.
- Open the properties file in a text editor.
-
Locate the following line:
NONEtableView.schema.selectAllAtLevel=Select all at level
-
Change the text to your preferred wording. For example:
NONEtableView.schema.selectAllAtLevel=Choose a level to select all
-
Save your changes.
- Restart Tomcat (or the SuperWEB2 Service).
- Review your changes: