Use the Label Web component when you would like to display a plain
text value that cannot be edited by the user. For example, a summary for a
transaction might show the total cost as a label.
General tab (iwcl:WLabel)
Data tab
- Define data attributes
- Select this option to explicitly define the data type and attributes.
- Type
- Select Character or Numeric data
type for the label. If Numeric is selected, the Define button
for formatting is enabled.
- Length
- Specify the data length that is returned from the program.
- Decimal places
- Specify the number of decimal positions for the Numeric data type.
- Get data attribute from IBM i database
- Select this option to enable the Get button.
- Get
- This button enables you to navigate to the database reference on an IBM i server,
and retrieve the data attributes for the specified data type, data length,
decimal places, edit code, or edit word and edit parameter. When the field
attributes are retrieved, the Synchronize button is
enabled.
- Synchronize
- This button is enabled when the field attributes have been retrieved from
the database reference on the IBM i host.
If any changes are made to the data attributes on the host, clicking Synchronize automatically
refreshes the Attributes view with the changes.
- Get locale-sensitive values from:
- Indicates how the value for the decimal symbol is retrieved. The options
are:
- host system values
- By default the value for the decimal symbol is retrieved from the host
job DecimalFormat.
- client locale values
- The value of the decimal symbol is determined by the locale of the Web
browser at run time.
- user defined values
- Specify the value that you want to use as the decimal symbol in the Decimal
symbol field. The default value of the decimal symbol is retrieved
from the locale of the client system at design time.
- Formatting
- When data type is specified as Numeric, the Define button
for formatting is enabled. Select Define to open the
Define Formatting window, where:
- None
- Select this setting to indicate that no formatting is required.
- Edit code
- Select an edit code from the list to apply to the numeric data. The letter
or number indicates that editing should be done according to a defined pattern
before a field is displayed.
- Parameter
- Select None to indicate no additional option for
the edit code. Select Asterisk to indicate that leading
asterisks should be used. Select Currency to have the
floating currency symbol appear to the left of the first significant digit.
- Sample
- When the Edit code radio button is selected, the effect of the edit code
and the parameter selected is shown in the Positive Value, Negative
Value, and Zero Value fields in the sample
area.
- Edit word
- Specify the editing pattern for numeric data. You can specify:
- Blank spaces
- Commas and decimal points, and their position
- Suppression of unwanted zeros
- Leading asterisks
- The currency symbol, and its position
- Addition of constant characters
- Output of the negative sign, or CR, as a negative indicator.
- Get locale-sensitive values from:
- Indicates how the decimal symbol, currency symbol, thousands separator,
and date separator are applied when you select Edit code or Edit
word.
- When you select host system values on the Data tab,
the values for the decimal symbol, the thousands separator, and the date separator
are retrieved from the host job. The value for the currency symbol is retrieved
from the host system value QCURSYM.
- When you select client locale values, the values
for the decimal symbol, the currency symbol, the thousands separator, and
the date separator are retrieved from the locale of the Web browser at run
time.
- When you specify user defined values on the Data
tab, the fields for the currency symbol, the thousands separator, and the
date separator can be changed if you select Edit code or Edit
word to enable the fields. The default values for the currency
symbol and for the thousands separator are retrieved from the locale of the
client system at design time. The default value for the date separator is
"/".
Styles tab
The Styles tab contains inline
style options for the
IBM i Web
component.
- Inline Style
- Select the Fonts, Font styles, Background
Color, and Text layout buttons to open
the respective style definition windows. Use each window to select the options
that you want to apply to the IBM i Web
component.
Additional information about formatting
Formatting
of data is performed automatically if an initial value has been defined in
the attribute view of the Web component, or if data is assigned to the Web
component at run time by the host program. The formatting is performed by
the tag library at run time and before it is displayed in the field.
White space and performance
If multiple space characters
occur in sequence, only one is displayed. In order to display all of the spaces,
you can change the DOCTYPE of JSP/HTML pages from -//W3C//DTD
HTML 4.01 Transitional//EN to -//W3C//DTD HTML 4.01 STRICT//EN.