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

java.lang.Object
  extended by javax.faces.view.facelets.TagHandlerDelegate
      extended by org.apache.myfaces.view.facelets.tag.jsf.ValidatorTagHandlerDelegate
All Implemented Interfaces:
javax.faces.view.AttachedObjectHandler, javax.faces.view.EditableValueHolderAttachedObjectHandler, javax.faces.view.ValueHolderAttachedObjectHandler

public class ValidatorTagHandlerDelegate
extends javax.faces.view.facelets.TagHandlerDelegate
implements javax.faces.view.EditableValueHolderAttachedObjectHandler

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.

Since:
2.0
Version:
$Revision: 1100298 $ $Date: 2011-05-06 12:39:50 -0500 (Fri, 06 May 2011) $
Author:
Leonardo Uribe (latest modification by $Author: lu4242 $)

Field Summary
static java.lang.String VALIDATOR_ID_EXCLUSION_LIST_KEY
          if has no children and its disabled attribute is true, its validatorId will be added to the exclusion list stored under this key on the parent UIComponent.
 
Constructor Summary
ValidatorTagHandlerDelegate(javax.faces.view.facelets.ValidatorHandler delegate)
           
 
Method Summary
 void apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent)
           
 void applyAttachedObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent)
           
 javax.faces.view.facelets.MetaRuleset createMetaRuleset(java.lang.Class type)
           
protected  javax.faces.validator.Validator createValidator(javax.faces.view.facelets.FaceletContext ctx)
          Template method for creating a Validator instance
 java.lang.String getFor()
           
 java.lang.String getValidationGroups(javax.faces.view.facelets.FaceletContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATOR_ID_EXCLUSION_LIST_KEY

public static final java.lang.String VALIDATOR_ID_EXCLUSION_LIST_KEY
if has no children and its disabled attribute is true, its validatorId will be added to the exclusion list stored under this key on the parent UIComponent.

See Also:
Constant Field Values
Constructor Detail

ValidatorTagHandlerDelegate

public ValidatorTagHandlerDelegate(javax.faces.view.facelets.ValidatorHandler delegate)
Method Detail

apply

public void apply(javax.faces.view.facelets.FaceletContext ctx,
                  javax.faces.component.UIComponent parent)
           throws java.io.IOException
Specified by:
apply in class javax.faces.view.facelets.TagHandlerDelegate
Throws:
java.io.IOException

createValidator

protected javax.faces.validator.Validator createValidator(javax.faces.view.facelets.FaceletContext ctx)
Template method for creating a Validator instance

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

createMetaRuleset

public javax.faces.view.facelets.MetaRuleset createMetaRuleset(java.lang.Class type)
Specified by:
createMetaRuleset in class javax.faces.view.facelets.TagHandlerDelegate

applyAttachedObject

public void applyAttachedObject(javax.faces.context.FacesContext context,
                                javax.faces.component.UIComponent parent)
Specified by:
applyAttachedObject in interface javax.faces.view.AttachedObjectHandler

getFor

public java.lang.String getFor()
Specified by:
getFor in interface javax.faces.view.AttachedObjectHandler

getValidationGroups

public java.lang.String getValidationGroups(javax.faces.view.facelets.FaceletContext ctx)


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