public class ValidateAll extends ValidateMultipleFields
The <o:validateAll> validates if ALL of the given UIInput components have been filled out.
One could of course also just put required="true" on all of those UIInput components, but
sometimes it's desireable to invalidate all of those fields and/or to have just only one message for it, which isn't
possible with the standard JSF API.
The default message is
{0}: Please fill out all of those fields
For general usage instructions, refer ValidateMultipleFields documentation.
ValidateMultipleFields,
ValidatorFamily,
MultiFieldValidator| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_TYPE
The standard component type.
|
COMPONENT_FAMILYBEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY| Constructor and Description |
|---|
ValidateAll() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
shouldInvalidateInput(FacesContext context,
UIInput input,
Object value)
In an invalidating case, invalidate only those inputs which have an empty value.
|
boolean |
validateValues(FacesContext context,
List<UIInput> inputs,
List<Object> values)
Validate if all is filled out.
|
collectComponents, collectValues, getComponents, getMessage, getShowMessageFor, isDisabled, isInvalidateAll, isValidationFailed, setComponents, setDisabled, setInvalidateAll, setMessage, setShowMessageFor, showMessage, validateComponents, validateHierarchyencodeChildren, getFamily, getRendersChildren, processDecodes, processUpdates, processValidatorsaddClientBehavior, 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, setValueBindingencodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTreepublic static final String COMPONENT_TYPE
public boolean validateValues(FacesContext context, List<UIInput> inputs, List<Object> values)
context - The faces context to work with.inputs - 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).protected boolean shouldInvalidateInput(FacesContext context, UIInput input, Object value)
shouldInvalidateInput in class ValidateMultipleFieldscontext - The faces context to work with.input - The input component which may need to be invalidated.value - The value of the input component.Copyright © 2012–2016 OmniFaces. All rights reserved.