|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.commons.validator.ValidatorBase
org.apache.myfaces.commons.validator.AbstractDateRestrictionValidator
@JSFValidator(name="mcv:validateDateRestriction", clazz="org.apache.myfaces.commons.validator.DateRestrictionValidator", bodyContent="empty", tagClass="org.apache.myfaces.commons.validator.ValidateDateRestrictionTag", tagHandler="org.apache.myfaces.commons.validator.ValidateDateRestrictionTagHandler", serialuidtag="6805174635196400967L") public abstract class AbstractDateRestrictionValidator
Validate that the date entered is within a given restriction.
Field Summary | |
---|---|
static String |
DAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid days value check fails. |
static String |
MONTH_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid month value check fails. |
static String |
VALIDATOR_ID
|
static String |
WEEKDAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid weekdays value check fails. |
Fields inherited from interface javax.faces.validator.Validator |
---|
NOT_IN_RANGE_MESSAGE_ID |
Constructor Summary | |
---|---|
AbstractDateRestrictionValidator()
Construct a Validator with no preconfigured limits. |
Method Summary | |
---|---|
protected Calendar |
getCalendar()
|
protected static Date |
getDateValue(Object value)
Parses the already converted value to a java.util.Date . |
abstract DateListProvider |
getInvalidDays()
To specifiy a concrete List of Dates, use the invalidDays attribute and wire it to a DateListProvider implementation. |
abstract String[] |
getInvalidDaysOfWeek()
Specify the weekdays which are invalid for your use case. |
abstract String[] |
getInvalidMonths()
Specify the month which are invalid for your use case. |
abstract void |
setInvalidDays(DateListProvider invalidDays)
|
abstract void |
setInvalidDaysOfWeek(String[] invalidDaysOfWeek)
|
abstract void |
setInvalidMonths(String[] invalidMonths)
|
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
|
Methods inherited from class org.apache.myfaces.commons.validator.ValidatorBase |
---|
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getStringValue, getSummaryMessage, getValueExpression, isTransient, restoreAttachedState, restoreState, saveAttachedState, saveState, setDetailMessage, setMessage, setSummaryMessage, setTransient, setValueExpression |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VALIDATOR_ID
public static final String DAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid days value check fails. The message format
string for this message may optionally include {0}
,
{1}
and {3}
placeholders,
which will be replaced by user input, component label and configured
days value.
public static final String MONTH_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid month value check fails. The message format
string for this message may optionally include {0}
,
{1}
and {3}
placeholders,
which will be replaced by user input, component label and configured
month value.
public static final String WEEKDAY_MESSAGE_ID
The message identifier of the FacesMessage
to be created if the valid weekdays value check fails. The message format
string for this message may optionally include {0}
,
{1}
and {3}
placeholders,
which will be replaced by user input, component label and configured
weekdays value.
Constructor Detail |
---|
public AbstractDateRestrictionValidator()
Validator
with no preconfigured limits.
Method Detail |
---|
@JSFProperty(deferredValueType="java.lang.Object") public abstract String[] getInvalidMonths()
public abstract void setInvalidMonths(String[] invalidMonths)
@JSFProperty(deferredValueType="java.lang.Object") public abstract String[] getInvalidDaysOfWeek()
public abstract void setInvalidDaysOfWeek(String[] invalidDaysOfWeek)
@JSFProperty public abstract DateListProvider getInvalidDays()
public abstract void setInvalidDays(DateListProvider invalidDays)
public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value) throws javax.faces.validator.ValidatorException
IllegalArgumentException
- if value
is not of type
Date
javax.faces.validator.ValidatorException
protected Calendar getCalendar()
protected static Date getDateValue(Object value) throws IllegalArgumentException
java.util.Date
.
value
- converted value
java.util.Date
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |