org.apache.myfaces.extensions.validator.core.validation.parameter
Class DefaultViolationSeverityInterpreter
java.lang.Object
org.apache.myfaces.extensions.validator.core.validation.parameter.DefaultViolationSeverityInterpreter
- All Implemented Interfaces:
- ViolationSeverityInterpreter
public class DefaultViolationSeverityInterpreter
- extends Object
- implements ViolationSeverityInterpreter
mechanism to change the default behavior of extval
- Since:
- x.x.3
- Author:
- Gerhard Petracek
Method Summary |
boolean |
severityBlocksNavigation(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
|
boolean |
severityBlocksSubmit(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
|
boolean |
severityCausesValidatorException(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
|
boolean |
severityCausesViolationMessage(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
|
boolean |
severityShowsIndication(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
available for add-ons - not used internally due to performance reasons |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultViolationSeverityInterpreter
public DefaultViolationSeverityInterpreter()
severityBlocksNavigation
public boolean severityBlocksNavigation(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
- Specified by:
severityBlocksNavigation
in interface ViolationSeverityInterpreter
- Parameters:
facesContext
- current faces contextuiComponent
- current componentseverity
- jsf severity for faces messages
- Returns:
- true if the given severity should block the navigation
if #severityCausesValidatorException returns falls validation will be continued for the current property
all messages which don't lead to an exception should be stored in an storage and
added after the first message which gets thrown as exception
a global PropertyValidationInterceptor add the messages of the storage as faces message
severityCausesValidatorException
public boolean severityCausesValidatorException(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
- Specified by:
severityCausesValidatorException
in interface ViolationSeverityInterpreter
- Parameters:
facesContext
- current faces contextuiComponent
- current componentseverity
- jsf severity for faces messages
- Returns:
- true if the given severity should cause a validator exception
severityCausesViolationMessage
public boolean severityCausesViolationMessage(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
- Specified by:
severityCausesViolationMessage
in interface ViolationSeverityInterpreter
- Parameters:
facesContext
- current faces contextuiComponent
- current componentseverity
- jsf severity for faces messages
- Returns:
- true if a violation message leads to a faces message
severityBlocksSubmit
public boolean severityBlocksSubmit(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
- Specified by:
severityBlocksSubmit
in interface ViolationSeverityInterpreter
- Parameters:
facesContext
- current faces contextuiComponent
- current componentseverity
- jsf severity for faces messages
- Returns:
- true if the constraint with the given severity should be validated on the client side (if supported)
severityShowsIndication
public boolean severityShowsIndication(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
javax.faces.application.FacesMessage.Severity severity)
- Description copied from interface:
ViolationSeverityInterpreter
- available for add-ons - not used internally due to performance reasons
- Specified by:
severityShowsIndication
in interface ViolationSeverityInterpreter
- Parameters:
facesContext
- current faces contextuiComponent
- current componentseverity
- jsf severity for faces messages
- Returns:
- true if the constraint with the given severity
should cause e.g. a required marker independent of client-side validation (if supported)
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.