public class ValidateOrder extends ValidateMultipleFields
UIInput
components are in the order
from least to greatest without duplicates, exactly as specified in the components
attribute. The default
message is
{0}: Please fill out the values of all those fields in order
For general usage instructions, refer ValidateMultipleFields
documentation.
This validator has the additional requirement that the to-be-validated values must implement Comparable
.
This validator throws an IllegalArgumentException
when one or more of the values do not implement it.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMPONENT_TYPE
The standard component type.
|
COMPONENT_FAMILY
Constructor and Description |
---|
ValidateOrder()
The default constructor sets the default message.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
validateValues(javax.faces.context.FacesContext context,
java.util.List<javax.faces.component.UIInput> components,
java.util.List<java.lang.Object> values)
Validate if all values are in specified order.
|
collectComponents, collectValues, getComponents, getMessage, getShowMessageFor, isDisabled, setComponents, setDisabled, setMessage, setShowMessageFor, showMessage, validateComponents, validateHierarchy
encodeChildren, getFamily, getRendersChildren, processDecodes, processUpdates, processValidators
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTree
public static final java.lang.String COMPONENT_TYPE
public ValidateOrder()
protected boolean validateValues(javax.faces.context.FacesContext context, java.util.List<javax.faces.component.UIInput> components, java.util.List<java.lang.Object> values)
validateValues
in class ValidateMultipleFields
context
- The faces context to work with.components
- The input components whose values are to be validated.values
- The values of the input components to be validated.true
if validation is successful, otherwise false
(and thus show the message).