A Validator that checks against a Regular Expression (which is the pattern property). The pattern must resolve to a String that follows the java.util.regex standards.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| public static final String | MATCH_EXCEPTION_MESSAGE_ID
The message identifier of the |
| public static final String | NOT_MATCHED_MESSAGE_ID
The message identifier of the |
| public static final String | PATTERN_NOT_SET_MESSAGE_ID
The message identifier of the |
| private String | |
| private boolean | |
| public static final String | VALIDATOR_ID
The standard converter id for this converter. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clearInitialState()
Implements javax. Reset the PartialStateHolder to a non-delta tracking state. |
| public String | Returns: the patternReturn the |
| public boolean | initialStateMarked()
Implements javax. Return |
| public boolean | isTransient()
Implements javax. If true, the Object implementing this interface must not participate in state saving or restoring. |
| public void | markInitialState()
Implements javax. The runtime must ensure that the
|
| public void | restoreState(FacesContext
the Faces context. context, Object the state. state)Implements javax. Perform any processing required to restore the state from the entries in the state Object. |
| public Object | saveState(FacesContext
the Faces context. context)Implements javax. Gets the state of the instance as a
|
| public void | setPattern(String
a regular expression pattern pattern)The Regular Expression property to validate against. |
| public void | setTransient(boolean
boolean pass transientValue)true if this
Object will not
participate in state saving or restoring, otherwise pass
false.Implements javax. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring. |
| public void | validate(FacesContext
FacesContext for the request we are processing context, UIComponent UIComponent we are checking for correctness component, Object the value to validate value)Implements javax. Validate a String against a regular expression pattern. |
| initialState | back to summary |
|---|---|
| private boolean initialState | |
| MATCH_EXCEPTION_MESSAGE_ID | back to summary |
|---|---|
| public static final String MATCH_EXCEPTION_MESSAGE_ID The message identifier of the | |
| NOT_MATCHED_MESSAGE_ID | back to summary |
|---|---|
| public static final String NOT_MATCHED_MESSAGE_ID The message identifier of the | |
| PATTERN_NOT_SET_MESSAGE_ID | back to summary |
|---|---|
| public static final String PATTERN_NOT_SET_MESSAGE_ID The message identifier of the | |
| regex | back to summary |
|---|---|
| private String regex | |
| transientValue | back to summary |
|---|---|
| private boolean transientValue | |
| VALIDATOR_ID | back to summary |
|---|---|
| public static final String VALIDATOR_ID The standard converter id for this converter. | |
| RegexValidator | back to summary |
|---|---|
| public RegexValidator() | |
| clearInitialState | back to summary |
|---|---|
| public void clearInitialState() Implements javax. Doc from javax. Reset the PartialStateHolder to a non-delta tracking state.
| |
| getPattern | back to summary |
|---|---|
| public String getPattern() Return the
| |
| initialStateMarked | back to summary |
|---|---|
| public boolean initialStateMarked() Implements javax. Doc from javax. Return
| |
| isTransient | back to summary |
|---|---|
| public boolean isTransient() Implements javax. Doc from javax. If true, the Object implementing this interface must not participate in state saving or restoring.
| |
| markInitialState | back to summary |
|---|---|
| public void markInitialState() Implements javax. Doc from javax. The runtime must ensure that the
| |
| restoreState | back to summary |
|---|---|
| public void restoreState(FacesContext context, Object state) Implements javax. Doc from javax. Perform any processing required to restore the state from the entries in the state Object. If the class that implements this interface has references to
instances that also implement StateHolder (such as a
If the
| |
| saveState | back to summary |
|---|---|
| public Object saveState(FacesContext context) Implements javax. Doc from javax. Gets the state of the instance as a
If the class that implements this interface has references to
instances that implement StateHolder (such as a
This method must not alter the state of the implementing object. In other words, after executing this code:
The return from this method must be
| |
| setPattern | back to summary |
|---|---|
| public void setPattern(String pattern) The Regular Expression property to validate against.
| |
| setTransient | back to summary |
|---|---|
| public void setTransient(boolean transientValue) Implements javax. Doc from javax. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.
| |
| validate | back to summary |
|---|---|
| public void validate(FacesContext context, UIComponent component, Object value) Implements javax. Validate a String against a regular expression pattern. The full regex pattern must be matched in order to pass the validation.
| |