public class Converter extends ConverterHandler
<o:converter>
basically extends the <f:converter>
tag family with the
possibility to evaluate the value expression in all attributes on a per request basis instead of on a per view
build time basis. This allows the developer to change the attributes on a per request basis.
When you specify for example the standard <f:convertDateTime>
by
converterId="javax.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
request based value expressions.
<o:converter converterId="javax.faces.DateTime" pattern="#{item.pattern}" locale="#{item.locale}" />
Modifier and Type | Class and Description |
---|---|
protected static class |
Converter.RenderTimeConverter
So that we can have a serializable converter.
|
delegateFactory
nextHandler, tag, tagId
Constructor and Description |
---|
Converter(ConverterConfig config)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(FaceletContext context,
UIComponent parent)
Create a
Converter based on the binding and/or converterId
attributes as per the standard JSF <f:converter> implementation and collect the render time
attributes. |
<T> T |
create(Application application,
String id)
|
TagAttribute |
getTagAttribute(String name)
Just return TagHandler#getAttribute() via a public method (it's by default protected and otherwise thus
unavailable inside collectRenderTimeAttributes().
|
protected TagHandlerDelegate |
getTagHandlerDelegate() |
boolean |
isDisabled(FaceletContext context) |
getConverterId
applyAttachedObject, getAttachedObjectHandlerHelper, getFor
applyNextHandler, createMetaRuleset, getBinding, getTag, getTagId, setAttributes
getAttribute, getRequiredAttribute, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyAttachedObject, getFor
public Converter(ConverterConfig config)
config
- The converter config.public void apply(FaceletContext context, UIComponent parent) throws IOException
Converter
based on the binding
and/or converterId
attributes as per the standard JSF <f:converter>
implementation and collect the render time
attributes. Then create an anonymous Converter
implementation which wraps the created
Converter
and delegates the methods to it after setting the render time attributes. Finally set the
anonymous implementation on the parent component.apply
in interface FaceletHandler
apply
in class DelegatingMetaTagHandler
context
- The involved facelet context.parent
- The parent component to set the Converter
on.IOException
- If something fails at I/O level.public <T> T create(Application application, String id)
public TagAttribute getTagAttribute(String name)
getTagAttribute
in class DelegatingMetaTagHandler
protected TagHandlerDelegate getTagHandlerDelegate()
getTagHandlerDelegate
in class ConverterHandler
public boolean isDisabled(FaceletContext context)
isDisabled
in class DelegatingMetaTagHandler