|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.books.view.component.RegexValidator
public class RegexValidator
CAS Enterprise Application Development mit Java EE (EADJ) - 2007
Modul: Web-Tier (JSF)
Uebung: 10 (Custom Validator and Converter Tags)
Beschreibung:
Diese Klasse implementiert einen Validator fuer Reulaere Ausdruecke.
Copyright (c) 2007 bouquet dot ch, 3032 Hinterkappelen. All rights reseved.
@link{javax.faces.validator.Validator}
,
@link{javax.faces.component.StateHolder}
Field Summary | |
---|---|
static java.lang.String |
VALIDATOR_ID
The identifier of the validator. |
Fields inherited from interface javax.faces.validator.Validator |
---|
NOT_IN_RANGE_MESSAGE_ID |
Constructor Summary | |
---|---|
RegexValidator()
|
Method Summary | |
---|---|
boolean |
isTransient()
Returns the transient value. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
Restores the state of the validator. |
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
Saves the state of the validator. |
void |
setPattern(java.lang.String pattern)
Sets the pattern of the regular expression. |
void |
setTransient(boolean value)
Sets the transient value. |
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
Validates a text against the regular expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VALIDATOR_ID
Constructor Detail |
---|
public RegexValidator()
Method Detail |
---|
public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value) throws javax.faces.validator.ValidatorException
validate
in interface javax.faces.validator.Validator
context
- FacesContext FacesContext
the faces contextcomponent
- UIComponent UIComponent
the componentvalue
- Object
javax.faces.validator.ValidatorException
public boolean isTransient()
isTransient
in interface javax.faces.component.StateHolder
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
context
- FacesContext FacesContext
the faces context
public void setTransient(boolean value)
setTransient
in interface javax.faces.component.StateHolder
value
- booleanpublic void setPattern(java.lang.String pattern)
pattern
- Stringpublic void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
context
- context FacesContext FacesContext
the faces contextstate
- Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |