- java.lang.Object
-
- jakarta.faces.component.UIComponent
-
- jakarta.faces.component.UIComponentBase
-
- org.omnifaces.component.validator.ValidatorFamily
-
- All Implemented Interfaces:
PartialStateHolder,StateHolder,TransientStateHolder,ComponentSystemEventListener,FacesListener,SystemEventListenerHolder,EventListener
- Direct Known Subclasses:
ValidateMultipleFields
public abstract class ValidatorFamily extends UIComponentBase
Base class which is to be shared between all components of the Validator family.- Author:
- Bauke Scholtz
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENT_FAMILYThe standard component family.-
Fields inherited from class jakarta.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
-
-
Constructor Summary
Constructors Constructor Description ValidatorFamily()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidencodeChildren(FacesContext context)CallsvalidateHierarchy().StringgetFamily()ReturnsCOMPONENT_FAMILY.booleangetRendersChildren()Returnstrue.voidprocessDecodes(FacesContext context)CallsvalidateHierarchy().voidprocessUpdates(FacesContext context)Does nothing.voidprocessValidators(FacesContext context)protected abstract voidvalidateComponents(FacesContext context)Perform the actual validation.protected abstract voidvalidateHierarchy()Validate our own component hierarchy.-
Methods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
-
Methods inherited from class jakarta.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
-
-
-
-
Field Detail
-
COMPONENT_FAMILY
public static final String COMPONENT_FAMILY
The standard component family.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFamily
public String getFamily()
ReturnsCOMPONENT_FAMILY.- Specified by:
getFamilyin classUIComponent
-
getRendersChildren
public boolean getRendersChildren()
Returnstrue.- Overrides:
getRendersChildrenin classUIComponentBase
-
processDecodes
public void processDecodes(FacesContext context)
CallsvalidateHierarchy().- Overrides:
processDecodesin classUIComponentBase
-
processValidators
public void processValidators(FacesContext context)
- Overrides:
processValidatorsin classUIComponentBase
-
processUpdates
public void processUpdates(FacesContext context)
Does nothing.- Overrides:
processUpdatesin classUIComponentBase
-
encodeChildren
public void encodeChildren(FacesContext context) throws IOException
CallsvalidateHierarchy().- Overrides:
encodeChildrenin classUIComponentBase- Throws:
IOException
-
validateHierarchy
protected abstract void validateHierarchy()
Validate our own component hierarchy.- Throws:
IllegalStateException- When component hierarchy is wrong.
-
validateComponents
protected abstract void validateComponents(FacesContext context)
Perform the actual validation.- Parameters:
context- The faces context to work with.
-
-