org.apache.myfaces.view.facelets.tag.jsf
Class ConvertHandler

java.lang.Object
  extended by javax.faces.view.facelets.TagHandler
      extended by javax.faces.view.facelets.MetaTagHandler
          extended by org.apache.myfaces.view.facelets.tag.MetaTagHandlerImpl
              extended by org.apache.myfaces.view.facelets.tag.jsf.ConvertHandler
All Implemented Interfaces:
FaceletHandler

Deprecated. use javax.faces.view.facelets.ConverterHandler instead

@Deprecated
public class ConvertHandler
extends MetaTagHandlerImpl

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.

Version:
$Id: ConvertHandler.java 1187700 2011-10-22 12:19:37Z bommel $
Author:
Jacob Hookom
See Also:
ConverterELTag, Converter, ValueHolder

Field Summary
 
Fields inherited from class javax.faces.view.facelets.TagHandler
nextHandler, tag, tagId
 
Constructor Summary
ConvertHandler(ConverterConfig config)
          Deprecated.  
ConvertHandler(TagConfig config)
          Deprecated.  
 
Method Summary
 void apply(FaceletContext ctx, UIComponent parent)
          Deprecated. Set Converter instance on parent ValueHolder if it's not being restored.
protected  Converter createConverter(FaceletContext ctx)
          Deprecated. Create a Converter instance
protected  MetaRuleset createMetaRuleset(Class type)
          Deprecated. Extend this method in order to add your own rules.
 
Methods inherited from class javax.faces.view.facelets.MetaTagHandler
setAttributes
 
Methods inherited from class javax.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConvertHandler

public ConvertHandler(TagConfig config)
Deprecated. 

Parameters:
config -

ConvertHandler

public ConvertHandler(ConverterConfig config)
Deprecated. 
Method Detail

apply

public final void apply(FaceletContext ctx,
                        UIComponent parent)
                 throws IOException,
                        FacesException,
                        FaceletException,
                        javax.el.ELException
Deprecated. 
Set Converter instance on parent ValueHolder if it's not being restored.
  1. Cast to ValueHolder
  2. If "binding" attribute was specified, fetch/create and re-bind to expression.
  3. Otherwise, call createConverter.
  4. Call setAttributes on Converter instance.
  5. Set the Converter on the ValueHolder
  6. If the ValueHolder has a localValue, convert it and set the value

Throws:
IOException
FacesException
FaceletException
javax.el.ELException
See Also:
ValueHolder, Converter, createConverter(FaceletContext), FaceletHandler.apply(javax.faces.view.facelets.FaceletContext, javax.faces.component.UIComponent)

createConverter

protected Converter createConverter(FaceletContext ctx)
Deprecated. 
Create a Converter instance

Parameters:
ctx - FaceletContext to use
Returns:
Converter instance, cannot be null

createMetaRuleset

protected MetaRuleset createMetaRuleset(Class type)
Deprecated. 
Description copied from class: MetaTagHandlerImpl
Extend this method in order to add your own rules.

Overrides:
createMetaRuleset in class MetaTagHandlerImpl


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.