public class BeanValidationEventListener
extends java.lang.Object
implements javax.faces.event.SystemEventListener
BeanValidator.setValidationGroups(String)
for all components in the current view. This allows to
temporarily use different validationGroups or disabling validation if a specific UICommand
or UIInput
has invoked the form submit.Constructor and Description |
---|
BeanValidationEventListener(java.lang.String validationGroups,
boolean disabled)
Construct an instance of bean validation event listener based on the given validation groups and disabled state.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isListenerForSource(java.lang.Object source)
Only listens to
UIInput components which have a BeanValidator assigned. |
void |
processEvent(javax.faces.event.SystemEvent event)
Handle the
PreValidateEvent and PostValidateEvent . |
public BeanValidationEventListener(java.lang.String validationGroups, boolean disabled)
public boolean isListenerForSource(java.lang.Object source)
UIInput
components which have a BeanValidator
assigned.isListenerForSource
in interface javax.faces.event.SystemEventListener
public void processEvent(javax.faces.event.SystemEvent event) throws javax.faces.event.AbortProcessingException
PreValidateEvent
and PostValidateEvent
.processEvent
in interface javax.faces.event.SystemEventListener
javax.faces.event.AbortProcessingException