Top Description Fields Constructors Methods
javax.faces.view.facelets

public Class ValidatorHandler

extends FaceletsAttachedObjectHandler
implements EditableValueHolderAttachedObjectHandler
Class Inheritance
All Implemented Interfaces
javax.faces.view.EditableValueHolderAttachedObjectHandler, javax.faces.view.ValueHolderAttachedObjectHandler, javax.faces.view.AttachedObjectHandler
Imports
javax.faces.view.EditableValueHolderAttachedObjectHandler

Handles setting a javax.faces.validator.Validator instance on an javax.faces.component.EditableValueHolder parent. 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.

Field Summary

Modifier and TypeField and Description
private ValidatorConfig
private TagHandlerDelegate
private String

Constructor Summary

AccessConstructor and Description
public
ValidatorHandler(ValidatorConfig
the TagConfig subclass for this kind of attached object.
config
)

Construct this instance around the configuration information in argument config

Method Summary

Modifier and TypeMethod and Description
protected TagHandlerDelegate

Returns:

the implementation specific delegate instance
getTagHandlerDelegate
()

Implements abstract javax.faces.view.facelets.DelegatingMetaTagHandler.getTagHandlerDelegate.

Return the implementation specific delegate instance that provides the bulk of the work for this handler instance.

public ValidatorConfig

Returns:

the TagConfig subclass used to configure this handler instance.
getValidatorConfig
()

Return the TagConfig subclass used to configure this handler instance.

public String

Returns:

the validator-id
getValidatorId
(FaceletContext
the FaceletContext for this Facelet
ctx
)

Retrieve the id of the validator that is to be created and added to the parent EditableValueHolder.

Inherited from javax.faces.view.facelets.FaceletsAttachedObjectHandler:
applyAttachedObjectgetAttachedObjectHandlerHelpergetFor

Field Detail

configback to summary
private ValidatorConfig config
helperback to summary
private TagHandlerDelegate helper
validatorIdback to summary
private String validatorId

Constructor Detail

ValidatorHandlerback to summary
public ValidatorHandler(ValidatorConfig config)

Construct this instance around the configuration information in argument config

Parameters
config:ValidatorConfig

the TagConfig subclass for this kind of attached object.

Method Detail

getTagHandlerDelegateback to summary
protected TagHandlerDelegate getTagHandlerDelegate()

Implements abstract javax.faces.view.facelets.DelegatingMetaTagHandler.getTagHandlerDelegate.

Return the implementation specific delegate instance that provides the bulk of the work for this handler instance.

Returns:TagHandlerDelegate

the implementation specific delegate instance

Annotations
@Override
getValidatorConfigback to summary
public ValidatorConfig getValidatorConfig()

Return the TagConfig subclass used to configure this handler instance.

Returns:ValidatorConfig

the TagConfig subclass used to configure this handler instance.

getValidatorIdback to summary
public String getValidatorId(FaceletContext ctx)

Retrieve the id of the validator that is to be created and added to the parent EditableValueHolder. All subclasses should override this method because it is important for Facelets to have a unique way of identifying the validators that are added to this EditableValueHolder and allows exclusions to work properly. An exclusion is a validator declaration that has the attribute "disabled" which resolves to false, instructing Facelets not to register a default validator with the same id.

Parameters
ctx:FaceletContext

the FaceletContext for this Facelet

Returns:String

the validator-id