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 classComponentValidators.ValidatorInfoGeneric information container for a validator at a particular nesting Level. -
Constructor Summary
Constructors Constructor Description ComponentValidators() -
Method Summary
Modifier and Type Method Description static voidaddDefaultValidatorsToComponent(FacesContext ctx, EditableValueHolder editableValueHolder)Creates and installs default validators, if any, into the argumentEditableValueHolder.voidaddValidators(FacesContext ctx, EditableValueHolder editableValueHolder)Based on theValidatorInfoinstances present on the stack, configure the argumentEditableValueHolderwithValidators created from the available info.static ComponentValidatorsgetValidators(FacesContext context, boolean createIfNull)voidpopValidatorInfo()Pops the lastValidatorInfoinstance from the stack.voidpushValidatorInfo(ComponentValidators.ValidatorInfo info)Pushes the providedValidatorInfoonto the stack.
-
Constructor Details
-
ComponentValidators
public ComponentValidators()
-
-
Method Details
-
getValidators
- Parameters:
context- theFacesContextfor the current requestcreateIfNull- flag indicating whether or not aComponentValidatorsinstance should be created or not- Returns:
- a
ComponentValidatorsinstance for processing a view request. IfcreateIfNullisfalseand noComponentValidatorshas 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 noComponentValidatorsavailable, or there are noValidatorInfoinstances on the stack.- Parameters:
ctx- theFacesContextfor the current requesteditableValueHolder- the component receiving theValidators
-
addValidators
Based on the
ValidatorInfoinstances present on the stack, configure the argumentEditableValueHolderwithValidators created from the available info.- Parameters:
ctx- theFacesContextfor the current requesteditableValueHolder- the component receiving theValidators
-
pushValidatorInfo
Pushes the provided
ValidatorInfoonto the stack.- Parameters:
info-
-
popValidatorInfo
public void popValidatorInfo()Pops the last
ValidatorInfoinstance from the stack.
-