org.apache.myfaces.custom.regexprvalidator
Class RegExprValidator
java.lang.Object
org.apache.myfaces.validator.ValidatorBase
org.apache.myfaces.custom.regexprvalidator.RegExprValidator
- All Implemented Interfaces:
- java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator
- public class RegExprValidator
- extends ValidatorBase
- Version:
- $Revision: 491777 $ $Date: 2007-01-02 12:27:11 +0100 (Di, 02 Jän 2007) $
- Author:
- mwessendorf (latest modification by $Author: paulsp $)
|
Field Summary |
protected java.lang.String |
_pattern
|
static java.lang.String |
REGEXPR_MESSAGE_ID
The message identifier of the FacesMessage to be created if
the regex check fails. |
static java.lang.String |
VALIDATOR_ID
The standard converter id for this converter. |
| Fields inherited from interface javax.faces.validator.Validator |
NOT_IN_RANGE_MESSAGE_ID |
|
Method Summary |
java.lang.String |
getPattern()
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setPattern(java.lang.String string)
|
void |
validate(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Object value)
|
| Methods inherited from class org.apache.myfaces.validator.ValidatorBase |
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getSummaryMessage, getValueBinding, isTransient, restoreAttachedState, saveAttachedState, setDetailMessage, setMessage, setSummaryMessage, setTransient, setValueBinding |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VALIDATOR_ID
public static final java.lang.String VALIDATOR_ID
The standard converter id for this converter.
- See Also:
- Constant Field Values
REGEXPR_MESSAGE_ID
public static final java.lang.String REGEXPR_MESSAGE_ID
The message identifier of the FacesMessage to be created if
the regex check fails.
- See Also:
- Constant Field Values
_pattern
protected java.lang.String _pattern
RegExprValidator
public RegExprValidator()
validate
public void validate(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Object value)
throws javax.faces.validator.ValidatorException
- Throws:
javax.faces.validator.ValidatorException
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState in interface javax.faces.component.StateHolder- Overrides:
saveState in class ValidatorBase
- Parameters:
context -
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
- Specified by:
restoreState in interface javax.faces.component.StateHolder- Overrides:
restoreState in class ValidatorBase
getPattern
public java.lang.String getPattern()
- Returns:
- the pattern, on which a value should be validated
setPattern
public void setPattern(java.lang.String string)
- Parameters:
string - the pattern, on which a value should be validated
Copyright © 2007 Apache Software Foundation. All Rights Reserved.