org.apache.myfaces.commons.validator
Class DateRestrictionValidator

java.lang.Object
  extended by org.apache.myfaces.commons.validator.ValidatorBase
      extended by org.apache.myfaces.commons.validator.AbstractDateRestrictionValidator
          extended by org.apache.myfaces.commons.validator.DateRestrictionValidator
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public class DateRestrictionValidator
extends AbstractDateRestrictionValidator


Field Summary
static java.lang.String VALIDATOR_ID
           
 
Fields inherited from class org.apache.myfaces.commons.validator.AbstractDateRestrictionValidator
DAY_MESSAGE_ID, MONTH_MESSAGE_ID, WEEKDAY_MESSAGE_ID
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
DateRestrictionValidator()
           
 
Method Summary
 DateListProvider getInvalidDays()
          To specifiy a concrete List of Dates, use the invalidDays attribute and wire it to a DateListProvider implementation.
 java.lang.String[] getInvalidDaysOfWeek()
          Specify the weekdays which are invalid for your use case.
 java.lang.String[] getInvalidMonths()
          Specify the month which are invalid for your use case.
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setInvalidDays(DateListProvider invalidDays)
           
 void setInvalidDaysOfWeek(java.lang.String[] invalidDaysOfWeek)
           
 void setInvalidMonths(java.lang.String[] invalidMonths)
           
 
Methods inherited from class org.apache.myfaces.commons.validator.AbstractDateRestrictionValidator
getCalendar, getDateValue, validate
 
Methods inherited from class org.apache.myfaces.commons.validator.ValidatorBase
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getStringValue, getSummaryMessage, getValueExpression, isTransient, restoreAttachedState, saveAttachedState, 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

VALIDATOR_ID

public static final java.lang.String VALIDATOR_ID
See Also:
Constant Field Values
Constructor Detail

DateRestrictionValidator

public DateRestrictionValidator()
Method Detail

getInvalidMonths

public java.lang.String[] getInvalidMonths()
Description copied from class: AbstractDateRestrictionValidator
Specify the month which are invalid for your use case. The attribute takes a whitespace delimited list of months. Possible values are jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.

Specified by:
getInvalidMonths in class AbstractDateRestrictionValidator

setInvalidMonths

public void setInvalidMonths(java.lang.String[] invalidMonths)
Specified by:
setInvalidMonths in class AbstractDateRestrictionValidator

getInvalidDaysOfWeek

public java.lang.String[] getInvalidDaysOfWeek()
Description copied from class: AbstractDateRestrictionValidator
Specify the weekdays which are invalid for your use case. The attribute takes whitespace delimited list of weekdays. Possible values are sun, mon, tue, wed, thu, fri, sat.

Specified by:
getInvalidDaysOfWeek in class AbstractDateRestrictionValidator

setInvalidDaysOfWeek

public void setInvalidDaysOfWeek(java.lang.String[] invalidDaysOfWeek)
Specified by:
setInvalidDaysOfWeek in class AbstractDateRestrictionValidator

getInvalidDays

public DateListProvider getInvalidDays()
Description copied from class: AbstractDateRestrictionValidator
To specifiy a concrete List of Dates, use the invalidDays attribute and wire it to a DateListProvider implementation. This returns a list of dates, which are invalid.

Specified by:
getInvalidDays in class AbstractDateRestrictionValidator

setInvalidDays

public void setInvalidDays(DateListProvider invalidDays)
Specified by:
setInvalidDays in class AbstractDateRestrictionValidator

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class ValidatorBase

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class ValidatorBase


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.