The <o:converter> is a taghandler that extends the standard <f:converter> tag family with support for deferred value
expressions in all attributes. In other words, the converter attributes are not evaluated anymore on a per view build time basis, but just on every access
like as with UI components and bean properties. This has among others the advantage that they can be evaluated on a per-iteration basis inside an iterating
component, and that they can be set on a custom converter without needing to explicitly register it in a tagfile.
When you specify for example the standard <f:convertDateTime> by converterId="jakarta.faces.DateTime", then you'll be able to
use all its attributes such as pattern and locale as per its documentation, but then with the possibility to supply deferred value
expressions.
<o:converter converterId="jakarta.faces.DateTime" pattern="#{item.pattern}" locale="#{item.locale}" />
The converter ID of all standard Faces converters can be found in
their javadocs. First go to the javadoc of the
class of interest, then go to CONVERTER_ID in its field summary and finally click the Constant Field Values link to see the value.
The <o:converter> is currently not compatible with converters which are managed via the managed=true attribute set on the
FacesConverter annotation, at least not when using Mojarra. Internally, the converters are wrapped in another instance which doesn't have the needed
setter methods specified. In order to get them to work with <o:converter>, the managed=true attribute needs to be removed, so
that OmniFaces ConverterManager will automatically manage them.
| Info | Value |
|---|---|
| Converter ID | omnifaces.Converter |
| Handler Class | org.omnifaces.taghandler.Converter |
| Description | None |
| Name | Required | Type | Description |
|---|---|---|---|
binding | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| A ValueExpression that evaluates to an object that implements the jakarta.faces.convert.Converter interface. |
converterId | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| Converter identifier of the Converter to be created and registered. |
for | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| If present, this attribute refers to the value of one of the exposed attached objects within the composite component inside of which this tag is nested. |
Output generated by Vdldoc View Declaration Language Documentation Generator.