Class ValidatorTagHandlerDelegate
- java.lang.Object
-
- javax.faces.view.facelets.TagHandlerDelegate
-
- org.apache.myfaces.view.facelets.tag.jsf.ValidatorTagHandlerDelegate
-
- All Implemented Interfaces:
FacesWrapper<ValidatorHandler>,AttachedObjectHandler,EditableValueHolderAttachedObjectHandler,ValueHolderAttachedObjectHandler
public class ValidatorTagHandlerDelegate extends TagHandlerDelegate implements EditableValueHolderAttachedObjectHandler, FacesWrapper<ValidatorHandler>
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$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
-
-
Field Summary
Fields Modifier and Type Field Description static StringVALIDATOR_ID_EXCLUSION_LIST_KEYif <f:validateBean> 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
Constructors Constructor Description ValidatorTagHandlerDelegate(ValidatorHandler delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(FaceletContext ctx, UIComponent parent)voidapplyAttachedObject(FacesContext context, UIComponent parent)MetaRulesetcreateMetaRuleset(Class type)protected ValidatorcreateValidator(FaceletContext ctx)Template method for creating a Validator instanceStringgetFor()StringgetValidationGroups(FaceletContext ctx)ValidatorHandlergetWrapped()
-
-
-
Field Detail
-
VALIDATOR_ID_EXCLUSION_LIST_KEY
public static final String VALIDATOR_ID_EXCLUSION_LIST_KEY
if <f:validateBean> 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(ValidatorHandler delegate)
-
-
Method Detail
-
apply
public void apply(FaceletContext ctx, UIComponent parent) throws IOException
- Specified by:
applyin classTagHandlerDelegate- Throws:
IOException
-
createValidator
protected Validator createValidator(FaceletContext ctx)
Template method for creating a Validator instance- Parameters:
ctx- FaceletContext to use- Returns:
- a new Validator instance
-
createMetaRuleset
public MetaRuleset createMetaRuleset(Class type)
- Specified by:
createMetaRulesetin classTagHandlerDelegate
-
applyAttachedObject
public void applyAttachedObject(FacesContext context, UIComponent parent)
- Specified by:
applyAttachedObjectin interfaceAttachedObjectHandler
-
getFor
public String getFor()
- Specified by:
getForin interfaceAttachedObjectHandler
-
getValidationGroups
public String getValidationGroups(FaceletContext ctx)
-
getWrapped
public ValidatorHandler getWrapped()
- Specified by:
getWrappedin interfaceFacesWrapper<ValidatorHandler>
-
-