public abstract class AbstractValidator extends AbstractStateHolder implements javax.faces.validator.Validator
| Constructor and Description |
|---|
AbstractValidator() |
| Modifier and Type | Method and Description |
|---|---|
javax.faces.application.FacesMessage |
getFormattedErrorMessage(Object... messageArguments)
Gets the formatted error message by substituting the supplied
messageArguments into the message defined by the "message" attribute.
|
String |
getMessage()
Gets the message.
|
boolean |
hasMessage()
Determines whether this Validator has a message or not.
|
boolean |
isComponentOfTypeUIInput(javax.faces.component.UIComponent component)
Checks that the supplied uiComponent is of type UIInput.
|
void |
restoreState(javax.faces.context.FacesContext facesContext,
Object state)
Restores the state saved by
saveState(FacesContext). |
Object |
saveState(javax.faces.context.FacesContext facesContext)
Saves the state of this validator.
|
void |
setMessage(String message)
Sets the message.
|
isTransient, setTransientpublic String getMessage()
public void setMessage(String message)
message - The message to show in case of a validation error.public boolean hasMessage()
public javax.faces.application.FacesMessage getFormattedErrorMessage(Object... messageArguments)
messageArguments - The message arguments to substitute into the
supplied message.Formatter.format(java.util.Locale, String, Object...)public boolean isComponentOfTypeUIInput(javax.faces.component.UIComponent component)
component - The component to check.public Object saveState(javax.faces.context.FacesContext facesContext)
saveState in interface javax.faces.component.StateHolderfacesContext - The FacesContext.public void restoreState(javax.faces.context.FacesContext facesContext,
Object state)
saveState(FacesContext).restoreState in interface javax.faces.component.StateHolderfacesContext - The FacesContext.state - The state saved by saveState(FacesContext).Copyright © 2008–2018. All rights reserved.