public class DateSelect
extends javax.faces.component.UIInput
implements javax.faces.component.NamingContainer
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME
Constructor and Description |
---|
DateSelect() |
Modifier and Type | Method and Description |
---|---|
Integer[] |
createDays(int maximumDay)
Creates the days the user can select from.
|
Map<String,Integer> |
createMonths()
Creates the months the user can select from.
|
Integer[] |
createYears(int maximumYear,
int minimumYear)
Creates the years the user can select from.
|
void |
encodeBegin(javax.faces.context.FacesContext facesContext)
Sets the values of the day, month and year from the model date.
|
protected Object |
getConvertedValue(javax.faces.context.FacesContext facesContext,
Object submittedValue)
Converts the submitted value to a
Date . |
javax.faces.component.UIInput |
getDayComponent()
Gets the day component.
|
Integer[] |
getDays()
Gets the days the user can select from.
|
String |
getFamily()
Gets the component family.
|
javax.faces.component.UIInput |
getMonthComponent()
Gets the month component.
|
Map<String,Integer> |
getMonths()
Gets the months the user can select from.
|
Object |
getSubmittedValue()
Gets the submitted value.
|
javax.faces.component.UIInput |
getYearComponent()
Gets the year component.
|
Integer[] |
getYears()
Gets the years the user can select from.
|
void |
processDate(javax.faces.event.AjaxBehaviorEvent event)
Process a date that the user has selected.
|
void |
setDayComponent(javax.faces.component.UIInput day)
Sets the day component.
|
void |
setDays(Integer[] days)
Sets the days the user can select from.
|
void |
setMonthComponent(javax.faces.component.UIInput month)
Sets the month component.
|
void |
setMonths(Map<String,Integer> months)
Sets the months the user can select from.
|
void |
setYearComponent(javax.faces.component.UIInput year)
Sets the year component.
|
void |
setYears(Integer[] years)
Sets the years the user can select from.
|
addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConverterMessage, getRequiredMessage, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue
getConverter, getLocalValue, getValue, setConverter
addClientBehavior, addFacesListener, broadcast, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
public javax.faces.component.UIInput getDayComponent()
public void setDayComponent(javax.faces.component.UIInput day)
day
- The day component.public javax.faces.component.UIInput getMonthComponent()
public void setMonthComponent(javax.faces.component.UIInput month)
month
- The month component.public javax.faces.component.UIInput getYearComponent()
public void setYearComponent(javax.faces.component.UIInput year)
year
- The year component.public String getFamily()
getFamily
in class javax.faces.component.UIInput
public void encodeBegin(javax.faces.context.FacesContext facesContext) throws IOException
encodeBegin
in class javax.faces.component.UIComponentBase
facesContext
- The FacesContext.IOException
- When thrown by the superclass.public Object getSubmittedValue()
getSubmittedValue
in interface javax.faces.component.EditableValueHolder
getSubmittedValue
in class javax.faces.component.UIInput
protected Object getConvertedValue(javax.faces.context.FacesContext facesContext, Object submittedValue)
Date
.getConvertedValue
in class javax.faces.component.UIInput
facesContext
- The FacesContext.submittedValue
- The submitted value.Date
.javax.faces.convert.ConverterException
- When the submitted value could not be converted to a Date.
public void processDate(javax.faces.event.AjaxBehaviorEvent event)
event
- The ajax event.public Integer[] createDays(int maximumDay)
maximumDay
- The maximum day the user can select.public Map<String,Integer> createMonths()
public Integer[] createYears(int maximumYear, int minimumYear)
maximumYear
- The maximum year.minimumYear
- The minimum year.public Integer[] getDays()
public void setDays(Integer[] days)
days
- The days the user can select from.public final Map<String,Integer> getMonths()
public void setMonths(Map<String,Integer> months)
months
- The months the user can select from.public Integer[] getYears()
public void setYears(Integer[] years)
years
- The years the user can select from.Copyright © 2008–2018. All rights reserved.