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
Nested ClassesModifier and TypeClassDescriptionstatic classGeneric information container for a validator at a particular nesting Level. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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) voidPops the lastValidatorInfoinstance from the stack.voidPushes 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- validator info
-
popValidatorInfo
public void popValidatorInfo()Pops the last
ValidatorInfoinstance from the stack.
-