Class ComponentValidators
java.lang.Object
com.sun.faces.component.validator.ComponentValidators
public class ComponentValidators extends Object
This class is responsible for adding default validators and/or validators that wrap multiple
EditableValueHolder
instances within the view.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ComponentValidators.ValidatorInfo
Generic information container for a validator at a particular nesting Level. -
Constructor Summary
Constructors Constructor Description ComponentValidators()
-
Method Summary
Modifier and Type Method Description static 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
popValidatorInfo()
Pops the lastValidatorInfo
instance from the stack.void
pushValidatorInfo(ComponentValidators.ValidatorInfo info)
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
-
-
popValidatorInfo
public void popValidatorInfo()Pops the last
ValidatorInfo
instance from the stack.
-