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.
|