com.sun.facelets.tag.jsf
Class ValidateHandler

java.lang.Object
  extended by com.sun.facelets.tag.TagHandler
      extended by com.sun.facelets.tag.MetaTagHandler
          extended by com.sun.facelets.tag.jsf.ValidateHandler
All Implemented Interfaces:
FaceletHandler
Direct Known Subclasses:
ValidateDelegateHandler

public class ValidateHandler
extends MetaTagHandler

Handles setting a Validator instance on a EditableValueHolder. Will wire all attributes set to the Validator instance created/fetched. Uses the "binding" attribute for grabbing instances to apply attributes to.

Will only set/create Validator is the passed UIComponent's parent is null, signifying that it wasn't restored from an existing tree.

Version:
$Id: ValidateHandler.java,v 1.3 2005/08/24 04:38:51 jhook Exp $
Author:
Jacob Hookom

Field Summary
 
Fields inherited from class com.sun.facelets.tag.TagHandler
nextHandler, tag, tagId
 
Constructor Summary
ValidateHandler(TagConfig config)
          Deprecated.  
ValidateHandler(ValidatorConfig config)
           
 
Method Summary
 void apply(FaceletContext ctx, UIComponent parent)
          TODO
protected  MetaRuleset createMetaRuleset(Class type)
          Extend this method in order to add your own rules.
protected  Validator createValidator(FaceletContext ctx)
          Template method for creating a Validator instance
 
Methods inherited from class com.sun.facelets.tag.MetaTagHandler
setAttributes
 
Methods inherited from class com.sun.facelets.tag.TagHandler
findNextByType, getAttribute, getRequiredAttribute, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidateHandler

public ValidateHandler(TagConfig config)
Deprecated. 

Parameters:
config -

ValidateHandler

public ValidateHandler(ValidatorConfig config)
Method Detail

apply

public final void apply(FaceletContext ctx,
                        UIComponent parent)
                 throws IOException,
                        FacesException,
                        FaceletException,
                        javax.el.ELException
TODO

Parameters:
ctx - the current FaceletContext instance for this execution
parent - the parent UIComponent to operate upon
Throws:
IOException
FacesException
FaceletException
javax.el.ELException
See Also:
FaceletHandler.apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)

createValidator

protected Validator createValidator(FaceletContext ctx)
Template method for creating a Validator instance

Parameters:
ctx - FaceletContext to use
Returns:
a new Validator instance

createMetaRuleset

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

Overrides:
createMetaRuleset in class MetaTagHandler
Returns:


Copyright © 2005 All Rights Reserved.