 |
Control API for Label (label)
A multiline region for displaying text. Text in the component is restricted
to a single font, size and style unless set with HTML commands.
label works similar to textView. In addition a label has an associated
component like an inputField or listBox.
- design
Defines the appearance of the label.
The CSS controls how the different options are rendered. The
following description is based on the standard CSS delivered.
- LABEL
Text size and attributes STANDARD
- LABELSMALL
Text size -2 in comparison to STANDARD
- encode
A boolean value that defines how the
label text is interpreted. HTML text formatting commands (e.g. <h1>,
<i> etc.) can be used to change the display of the text. If there
are no formatting commands in the text string, the encode attribute
has no effect.
Example
text="<h1><i>Important</i></h>
encode = "false"
the text string is rendered by interpreting the formatting commands.
Encode = "true" 
the formatting commands are displayed and not interpreted
- id
Identification name of the label.
- labelFor
Identification name of the next component,
which is associated with the label.
- required
A boolean value. If set to "true"
a character (e.g. an asterisk (*) in red color) defined by the style
sheet is placed at the end of the text string. This is a common method
to indicate that input is required. See also inputField.
- text
Defines the string of text displayed.
See 'encode' for a formatting example with embedded HTML commands.
- tooltip
Defines the hint of the textView which
is displayed as the mouse cursor passes over the textView,
or as the mouse button is pressed but not released.
- width
Defines the width of the textView.
The width shows only effect when the 'wrapping' attribute is set to
"true". Otherwise the width and layout follows the HTML commands
in the text string.
- wrapping
A boolean value. If set to "true" the text is word wrapped
at the set 'width' or - if no 'width' is set - at the form width.
| attribute |
req. |
values |
default |
case sens. |
JSP taglib |
classlib |
| design |
no |
LABEL
LABELSMALL |
LABEL |
yes |
design="LABEL" |
setDesign(TextViewDesign.LABEL) |
| encode |
no |
TRUE
FALSE |
TRUE |
yes |
encode="FALSE" |
setEncode(false) |
| id |
yes |
String |
none |
yes |
id="Intro_Text" |
|
| labelFor |
yes |
String |
none |
yes |
labelFor="id_inputField" |
setLabelFor(id_inputField_component) |
| required |
no |
TRUE
FALSE |
FALSE |
yes |
required="TRUE" |
setRequired(true) |
| text |
no |
String |
none |
no |
text="Your name
please" |
setText("Your
name please") |
| tooltip |
no |
String |
none |
no |
tooltip="Name
required" |
setTooltip("Name
required") |
| width |
no |
Unit |
100% |
no |
width="300" |
setWidth("300") |
| wrapping |
no |
TRUE
FALSE |
FALSE |
yes |
wrapping="TRUE" |
setWrapping(true) |
Example
<hbj:label
id="label_InputName"
required="TRUE"
text="ZIP Code"
design="LABEL" labelFor="InputName"
/>
<hbj:inputField
id="InputName"
type="string"
maxlength="100"
/>
Result

|
|