Output - Formatted Text

Outputs a formatted message to the page. The message is defined as a combination of static text and dynamic data that can come from a data storage (such as a database) or a bean.

 

Component at design time

Drag and drop an

Output - Formatted Text component onto the page:

The

Output - Formatted Text component looks like this on the page:

 

Component at runtime

The

Output - Formatted Text component looks like this on the page during runtime:

 

Properties and All Attributes views

The Properties view for a component shows the most common set of attributes you can set on a component, and, depending on the component, you might also see options for adding controls, actions, or other components. To open the Properties view, click

Window | Show View | Properties.

These common attributes for the Image component display on the h:outputFormat tab in the Properties view. See the All Output - Formatted Text attributes table for a complete list of attributes. Additional configuration options to add parameters are on the h:outputFormat tab.

Table 1. Output - Formatted Text configuration options

Configuration option

Description

Add a parameter value to substitute for each {n} in the value string

Allows you to specify the names and values of Output Message parameters. You may also remove items using the Remove button and change their order in the panel using the Move Up and Move Down buttons.

The All Attributes view shows a table of all the attributes you can set on a component, which includes those attributes you can access from the Properties view. To switch to the All Attributes view, click the

All Attributes icon in the upper right corner of the Properties view.

Table 2. All Output - Formatted Text attributes

Attribute name

Represented in Properties view by

Description

binding

Not represented

An expression that binds the component's instance (usually a user interface component) to a bean property (usually in the backing file).

converter

Not represented

Specifies the data type to which the value is converted. The JavaServer Faces implementation provides a set of Converter implementations that you can use to convert your component data to a type not supported by its renderer.

escape

Not represented

Specifies whether to escape HTML formatting (False) or to render HTML tags as HTML (True).

id

ID

Assigns a name to a component. Should be a unique name within a JSP.

immediate

Not represented

If true, skip straight to render phase of life cycle.

rendered

Not represented

Can be set to true or false:

  • false - Component will not be rendered to the browser at runtime.

  • true - Component will get rendered. This is the default value.

style

Style: Props

Specifies CSS style information for the component (for example, style="font-size : 8pt ; color : red"). Defines the properties (such as font and color) of the selected component. This may be done manually, or by clicking the button and selecting the desired properties from within the window.

styleClass

Style: Classes

Space-separated list of CSS style classes to be applied when this element is rendered. This value must be passed through as the class attribute on generated markup. Defines the classes (such as style sheets) of the selected component. This may be done manually, or by clicking the button and selecting the desired Classes from within the window.

title

Not represented

Specifies the title text, shown in browser as a tooltip at runtime. Used by a browser as the alternative text of a component if the alternative text is not specified.

value

Value

Specifies the initial text value for the component displayed at runtime. Contains information to be displayed, in the form of a specified value or a pointer to a dynamic value.