java.lang.Object
com.sun.faces.component.validator.ComponentValidators
This class is responsible for adding default validators and/or validators that wrap multiple
EditableValueHolder
instances within the view.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Generic information container for a validator at a particular nesting Level. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addDefaultValidatorsToComponent
(FacesContext ctx, EditableValueHolder editableValueHolder) Creates and installs default validators, if any, into the argumentEditableValueHolder
.void
addValidators
(FacesContext ctx, EditableValueHolder editableValueHolder) Based on theValidatorInfo
instances present on the stack, configure the argumentEditableValueHolder
withValidator
s created from the available info.static ComponentValidators
getValidators
(FacesContext context, boolean createIfNull) void
Pops the lastValidatorInfo
instance from the stack.void
Pushes the providedValidatorInfo
onto the stack.
-
Constructor Details
-
ComponentValidators
public ComponentValidators()
-
-
Method Details
-
getValidators
- Parameters:
context
- theFacesContext
for the current requestcreateIfNull
- flag indicating whether or not aComponentValidators
instance should be created or not- Returns:
- a
ComponentValidators
instance for processing a view request. IfcreateIfNull
isfalse
and noComponentValidators
has been created, this method will returnnull
-
addDefaultValidatorsToComponent
public static void addDefaultValidatorsToComponent(FacesContext ctx, EditableValueHolder editableValueHolder) Creates and installs default validators, if any, into the argument
EditableValueHolder
. This method is merely a utility method to be called when there is noComponentValidators
available, or there are noValidatorInfo
instances on the stack.- Parameters:
ctx
- theFacesContext
for the current requesteditableValueHolder
- the component receiving theValidator
s
-
addValidators
Based on the
ValidatorInfo
instances present on the stack, configure the argumentEditableValueHolder
withValidator
s created from the available info.- Parameters:
ctx
- theFacesContext
for the current requesteditableValueHolder
- the component receiving theValidator
s
-
pushValidatorInfo
Pushes the provided
ValidatorInfo
onto the stack.- Parameters:
info
- validator info
-
popValidatorInfo
public void popValidatorInfo()Pops the last
ValidatorInfo
instance from the stack.
-