Developing Web 2.0 applications
with JavaServerFaces
and Dreamweaver
>> Just Became Easier
Documentation
Search
  1. Introduction
  2. Getting Started
  3. Developing Web Sites
  4. Using Components
  5. Internationalization
  6. Code View Support
  7. Design View Support
  8. Keyboard Shortcuts
  9. Tag Object Toolbars
  10. JSF Server Behaviors
  11. Property Inspectors
  12. JSF Tag Reference
JSF HTML Tag Library
  h:body
  h:button
  h:column
  h:commandButton
  h:commandLink
  h:dataTable
  h:form
  h:graphicImage
  h:head
  h:inputHidden
  h:inputSecret
  h:inputText
  h:inputTextarea
  h:link
  h:message
  h:messages
Selected h:outputFormat
  h:outputLabel
  h:outputLink
  h:outputScript
  h:outputStylesheet
  h:outputText
  h:panelGrid
  h:panelGroup
  h:selectBooleanCheckbox
  h:selectManyCheckbox
  h:selectManyListbox
  h:selectManyMenu
  h:selectOneListbox
  h:selectOneMenu
  h:selectOneRadio
If you like this documentation, please take a look at my book:

12. JSF HTML Tag Reference

Documentation > JSF > JSF Tag Reference > JSF HTML Tag Library > h:outputFormat

h:outputFormat

The outputFormat tag renders parameterized text and allows you to customize the appearance of this text using CSS styles. Parameterized text is compound text containing placeholder values to be replaced by actual values at rendering time. See also the param tag.

JSF Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:h="http://java.sun.com/jsf/html">
<h:head />
<body>
<h:outputFormat value="Welcome, {0}. You have {1} new messages.">
	<f:param value="#{userController.user.firstName}" />
	<f:param value="#{userController.user.messageCount}" />
</h:outputFormat>
</body>
</html>
This example was formatted by JSFToolbox for Dreamweaver.

HTML Output

Welcome, John. You have 12 new messages.

Tag Attributes

binding Expression
 
The value-binding expression linking this component tag to a backing bean property.
converter Text
 
The converter attribute sets the converter instance to be registered for this component. It must match the converter-id value of a converter element defined in your Faces configuration file.
dir Enumerated
 
The dir attribute is a standard HTML attribute that overrides the default text directionality for this component. The values accepted for this component are "LTR" (left-to-right) and "RTL" (right-to-left).

This attribute accepts the following values:

  • LTR
  • RTL
escape Boolean
 
The escape attribute is a boolean flag that determines if sensitive HTML and XML characters should be escaped in the ourput generated by this component. The default value for this attribute is "true".
id Text
 
The unique identifier value for this component. The value must be unique within the closest naming container.
lang Text
 
The lang attribute is a standard HTML attribute that sets the code describing the language to be used in the markup generated by this component.
rendered Boolean
 
A value-binding expression that evaluates to a Boolean condition indicating if this component should be rendered.
style Text
 
The style attribute sets the CSS style definition to be applied to this component when it is rendered.
styleClass Text
 
The styleClass attribute sets the CSS class to apply to this component when it is rendered.
title Text
 
The title attribute is a standard HTML attribute that sets the tooltip text to display for the rendered component.
value Text
 
The value attribute sets the current value for this component.