You see the Properties window for a JavaServer Faces Label component when you select the component on a page that you are editing in the Visual Designer or you select the Label node for the component in the Navigator window.
This JavaServer Faces 1.2 component has the following properties.
General
id. Type: String
The name of the Label component in the page bean and the JSP file.
Appearance
for. Type: String
The component for which this Label provides a label. Click the drop down list to see which components can be associated with the label. Setting this property does not position the label close to the component—you must do that by dragging and positioning the components—but it does provide the following benefits.
When you associate a Label component with an input component, like a Text Field component, the Label component responds to settings and changes in the associated component. Specifically, if the input component's required property is true, the Label component displays an asterisk. If the server rejects the page submission because the input is invalid, the page displays the Label component's text in red.
labelLevel. Type: int
A number that affects the appearance of the label. 1 (Strong) is larger and bold. 2 (Medium), the default, is smaller and bold. 3 (Weak) is smaller and normal (not bold). This property takes effect only if the label property is set.
requiredIndicator. Type: boolean
Indicates that the component with which the label is associated must be filled in by the user. Use this property If the associated component does not have a required property or if the associated component's required property is not set. When this property or the
required property on the component to be labeled is selected, the required icon is displayed next to the label.
style. Type: String
Cascading Style Sheet rules (CSS level 2) to be applied to the component. For example:
position: absolute; left: 288px; top: 312px
You can enter values directly or click the ellipsis (...) button to use the Style Editor.
This property overrides any settings in the theme or the project CSS file for this component. If a style specified in this property does not appear to take effect, it is because an area of the component is obscured by a child component that has different style settings.
For a list of CSS2 style attributes, see the web page at
styleClass. Type: String A space-separated list of CSS2 style classes to be applied when the component is rendered. The style classes must be defined in the project's style sheet or in the theme's CSS file. If you click the ellipsis button (...), you see a list of all styles you can add to this property. For information on adding CSS classes and rules to the project's cascading style sheet, see CSS Editor.
See the note above under the style property description for an explanation of why a class added to this property might appear to have no effect on the component.
If you add a CSS style class from the current theme to your project CSS file and you redefine the style class, the change affects all components that use this style class. However, you can add your own style classes to the project CSS file that redefine the default style classes, and then when you add them to this property, the changes affect only this instance of this component.
text. Type: String
The text that displays on the label. This property is updated when you type text directly into the label component on the page.
Data
converter. Type: Converter
A JavaServer Faces converter that converts the value of the text property to a String so it can be displayed. The component will pick the correct converter for the text property if one is available, making it unnecessary to set this property in most cases. If the text property is bound to a value that is not on the list of converters, you have to supply your own converter and set this property.
If you use an Enum converter with this component, you must edit the converter's Java declaration to use an enum class as a parameter, as described in Enum Converter.
Behavior
toolTip. Type: String
Rendered as the HTML title attribute of the component, which is readable by a screen reader and can be displayed as a tool tip.
If the component is disabled, the tooltip will not display in most browsers.
visible. Type: boolean
Indicates whether or not the component can be seen by the user on the rendered HTML page. This property is selected by default. If you deselect this property, the component's HTML code is rendered on the page, but the component is not visible in the browser because it is hidden by a style setting. Because the HTML code is rendered, the component can still be processed on form submissions, and users who view source in the browser can see the HTML code. In addition, your web application can use client-side JavaScript to show or hide the component.
If you need to completely hide the component, for example, because it contains sensitive information that certain users should not see, deselect the rendered property.
JavaScript
onClick. Type: String
JavaScript to be executed when the user clicks the component.
onMouseDown. Type: String
JavaScript to be executed when the mouse cursor is over the component and the user presses down on the mouse button.
onMouseMove. Type: String
JavaScript to be executed when the user moves the mouse cursor within the component.
onMouseOut. Type: String
JavaScript to be executed when the user moves the mouse cursor away from the component after it has been over the component.
onMouseOver. Type: String
JavaScript to be executed when the user moves the mouse cursor onto the component.
onMouseUp. Type: String
JavaScript to be executed when the mouse cursor is over the component and the user releases the mouse button.
Advanced
hideIndicators. Type: String
If selected, prevents display of the required and invalid icons with the label. When the
required property on the component to be labeled is selected, the required icon is displayed next to the label. If the user submits the page with an
invalid value for the component, the invalid icon is displayed. This property
is useful if the component has more than one label, and only one label should
show the icons.
rendered. Type: boolean
If selected, the Label is to be rendered and processed on any subsequent page submission. If not selected, the Label does not appear on the page at all, not even as a hidden component.