Class ConverterTagHandlerDelegate
- java.lang.Object
- 
- jakarta.faces.view.facelets.TagHandlerDelegate
- 
- org.apache.myfaces.view.facelets.tag.faces.ConverterTagHandlerDelegate
 
 
- 
- All Implemented Interfaces:
- AttachedObjectHandler,- ValueHolderAttachedObjectHandler
 
 public class ConverterTagHandlerDelegate extends TagHandlerDelegate implements ValueHolderAttachedObjectHandler Handles setting a Converter instance on a ValueHolder. Will wire all attributes set to the Converter instance created/fetched. Uses the "binding" attribute for grabbing instances to apply attributes to.Will only set/create Converter is the passed UIComponent's parent is null, signifying that it wasn't restored from an existing tree. - Since:
- 2.0
- Version:
- $Revision$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
 
- 
- 
Constructor SummaryConstructors Constructor Description ConverterTagHandlerDelegate(ConverterHandler delegate)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(FaceletContext ctx, UIComponent parent)Set Converter instance on parent ValueHolder if it's not being restored.voidapplyAttachedObject(FacesContext context, UIComponent parent)protected ConvertercreateConverter(FaceletContext ctx)Create a Converter instanceMetaRulesetcreateMetaRuleset(Class type)StringgetFor()
 
- 
- 
- 
Constructor Detail- 
ConverterTagHandlerDelegatepublic ConverterTagHandlerDelegate(ConverterHandler delegate) 
 
- 
 - 
Method Detail- 
applypublic void apply(FaceletContext ctx, UIComponent parent) throws IOException Set Converter instance on parent ValueHolder if it's not being restored.- Cast to ValueHolder
- If "binding" attribute was specified, fetch/create and re-bind to expression.
- Otherwise, call createConverter.
- Call setAttributes(FaceletContext, Object) on Converter instance.
- Set the Converter on the ValueHolder
- If the ValueHolder has a localValue, convert it and set the value
 - Specified by:
- applyin class- TagHandlerDelegate
- Throws:
- IOException
 
 - 
createConverterprotected Converter createConverter(FaceletContext ctx) Create a Converter instance- Parameters:
- ctx- FaceletContext to use
- Returns:
- Converter instance, cannot be null
 
 - 
createMetaRulesetpublic MetaRuleset createMetaRuleset(Class type) - Specified by:
- createMetaRulesetin class- TagHandlerDelegate
 
 - 
applyAttachedObjectpublic void applyAttachedObject(FacesContext context, UIComponent parent) - Specified by:
- applyAttachedObjectin interface- AttachedObjectHandler
 
 - 
getForpublic String getFor() - Specified by:
- getForin interface- AttachedObjectHandler
 
 
- 
 
-