The <o:outputFormat> is a component that extends the standard <h:outputFormat> with support for capturing the output
and exposing it into the request scope by the variable name as specified by the var attribute.
You can use it the same way as <h:outputFormat>, you only need to change h: into o: to get the extra support for
var attribute. Here's are some usage examples:
<o:outputFormat value="#{i18n['link.title']}" var="_link_title">
<f:param value="#{bean.foo}" />
<f:param value="#{bean.bar}" />
</o:outputFormat>
<h:commandLink value="#{i18n['link.value']}" title="#{_link_title}" />
<o:outputFormat value="#{bean.number}" var="_percentage">
<f:convertNumber type="percent" />
</o:outputFormat>
<div title="Percentage: #{_percentage}" />
Make sure that the var attribute value doesn't conflict with any of existing variable names in the current EL scope, such as managed bean names.
It would be a good naming convention to start their names with _.
| Info | Value |
|---|---|
| Component Type | org.omnifaces.component.output.OutputFormat |
| Handler Class | None |
| Renderer Type | None |
| Description | None |
| Name | Required | Type | Description |
|---|---|---|---|
binding | false | jakarta.el.ValueExpression
(must evaluate to jakarta.faces.component.UIComponent)
| The ValueExpression linking this component to a property in a backing bean. |
converter | false | jakarta.el.ValueExpression
(must evaluate to jakarta.faces.convert.Converter)
| No Description |
dir | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| No Description |
escape | false | jakarta.el.ValueExpression
(must evaluate to boolean)
| No Description |
id | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| The component identifier for this component. This value must be unique within the closest parent component that is a naming container. |
lang | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| No Description |
rendered | false | jakarta.el.ValueExpression
(must evaluate to boolean)
| Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true. |
role | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| No Description |
style | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| No Description |
styleClass | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| No Description |
title | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| No Description |
value | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Object)
| No Description |
var | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| The variable name which exposes the captured output into the request scope. |
Output generated by Vdldoc View Declaration Language Documentation Generator.