public abstract class AbstractCalendar extends javax.faces.component.UIInput implements MetaComponentResolver, MetaComponentEncoder, EventsPopupsProps, PopupsProps, PositionProps, StyleClassProps, StyleProps
The <rich:calendar> component allows the user to enter a date and time through an in-line or pop-up calendar. The pop-up calendar can navigate through months and years, and its look and feel can be highly customized.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractCalendar.Mode |
protected static class |
AbstractCalendar.PropertyKeys |
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
static String |
DAYSDATA_META_COMPONENT_ID |
static String |
DEFAULT_DATE_PATTERN |
static String |
SUB_TIME_PATTERN |
static String |
TIME_PATTERN |
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
META_COMPONENT_SEPARATOR_CHAR
Constructor and Description |
---|
AbstractCalendar() |
Modifier and Type | Method and Description |
---|---|
void |
addCurrentDateChangeListener(CurrentDateChangeListener listener) |
void |
broadcast(javax.faces.event.FacesEvent event) |
ArrayList<Object> |
deleteEmptyPropeties(CalendarDataModelItem[] calendarDataModelItems) |
void |
encodeMetaComponent(javax.faces.context.FacesContext context,
String metaComponentId) |
static Object |
formatStartDate(Date date) |
abstract String |
getBoundaryDatesMode()
This attribute is responsible for behaviour of dates from the previous and next months which are displayed in the current
month.
|
abstract String |
getButtonClass()
Space-separated list of CSS style class(es) to be applied to the button element.
|
abstract String |
getButtonDisabledIcon()
Defines disabled icon for the popup button element.
|
abstract String |
getButtonIcon()
Defines icon for the popup button element.
|
abstract String |
getButtonLabel()
Defines label for the popup button element.
|
abstract Object |
getCurrentDate()
Used to define the month and year which will be displayed
|
CurrentDateChangeListener[] |
getCurrentDateChangeListeners() |
Date |
getCurrentDateOrDefault() |
abstract CalendarDataModel |
getDataModel()
Used to provide data for calendar elements.
|
abstract String |
getDatePattern()
Used to format the date and time strings, according to ISO 8601 (for example, d/M/yy HH:mm a)
|
abstract String |
getDayClassFunction()
The javascript function that determines the CSS style class for each day cell
|
abstract String |
getDayDisableFunction()
The javascript function that enables or disables a day cell
|
abstract String |
getDefaultLabel()
The starting label can be set when in the initial view state.
|
protected Date |
getDefaultPreloadBegin(Date date) |
protected Date |
getDefaultPreloadEnd(Date date) |
abstract Object |
getDefaultTime()
Defines time that will be used:
|
static Object |
getDefaultValueOfDefaultTime(javax.faces.context.FacesContext facesContext,
AbstractCalendar calendarComponent) |
abstract int |
getFirstWeekDay()
Determines the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France.
|
abstract String |
getInputClass()
Space-separated list of CSS style class(es) to be applied to the input element.
|
abstract String |
getInputSize()
Defines the size of an input field.
|
abstract String |
getInputStyle()
CSS style(s) to be applied to the input element
|
Object |
getLocale()
Used for locale definition
|
abstract int |
getMinDaysInFirstWeek()
Gets what the minimal days required in the first week of the year are; e.g., if the first week is defined as one that
contains the first day of the first month of a year, this method returns 1.
|
abstract AbstractCalendar.Mode |
getMode()
Valid values: ajax or client
|
abstract Object |
getMonthLabels()
Attribute that allows to customize names of the months.
|
abstract Object |
getMonthLabelsShort()
Attribute that allows to customize short names of the months.
|
abstract String |
getOnbeforecurrentdateselect()
The client-side script method to be called before the current month or year is changed
|
abstract String |
getOnbeforedateselect()
The client-side script method to be called before some date cell is selected
|
abstract String |
getOnbeforetimeselect()
The client-side script method to be called before time is selected
|
abstract String |
getOnchange()
Javascript code executed when this element loses focus and its value has been modified since gaining focus.
|
abstract String |
getOnclean()
The client-side script method to be called before the component is cleaned
|
abstract String |
getOncomplete()
The client-side script method to be called after the DOM is updated
|
abstract String |
getOncurrentdateselect()
The client-side script method to be called when the current month or year is changed
|
abstract String |
getOndatemouseout()
The client-side script method to be called when a pointer is moved away from the date cell
|
abstract String |
getOndatemouseover()
The client-side script method to be called when a pointer is moved onto the date cell
|
abstract String |
getOndateselect()
The client-side script method to be called when some date cell is selected
|
abstract String |
getOninputblur()
Javascript code executed when the input element loses focus.
|
abstract String |
getOninputchange()
Javascript code executed when the input field value is changed manually
|
abstract String |
getOninputclick()
Javascript code executed when a pointer button is clicked over the input element.
|
abstract String |
getOninputdblclick()
Javascript code executed when a pointer button is double clicked over the input element.
|
abstract String |
getOninputfocus()
Javascript code executed when the input element receives focus.
|
abstract String |
getOninputkeydown()
Javascript code executed when a key is pressed down over the input element.
|
abstract String |
getOninputkeypress()
Javascript code executed when a key is pressed and released over the input element.
|
abstract String |
getOninputkeyup()
Javascript code executed when a key is released over the input element.
|
abstract String |
getOninputmousedown()
Javascript code executed when a pointer button is pressed down over the input element.
|
abstract String |
getOninputmousemove()
Javascript code executed when a pointer button is moved within the input element.
|
abstract String |
getOninputmouseout()
Javascript code executed when a pointer button is moved away from the input element.
|
abstract String |
getOninputmouseover()
Javascript code executed when a pointer button is moved onto the input element.
|
abstract String |
getOninputmouseup()
Javascript code executed when a pointer button is released over the input element.
|
abstract String |
getOninputselect()
Javascript code executed called when the input field value is selected
|
abstract String |
getOntimeselect()
The client-side script method to be called after time is selected
|
abstract String |
getPopupClass()
Space-separated list of CSS style class(es) to be applied to the popup element.
|
abstract String |
getPopupStyle()
CSS style(s) to be applied to the popup element
|
Object |
getPreload() |
Date[] |
getPreloadDateRange() |
abstract Object |
getPreloadDateRangeBegin()
Defines the last range of date which will be loaded to client from dataModel under rendering
|
abstract Object |
getPreloadDateRangeEnd()
Define the initial range of date which will be loaded to client from dataModel under rendering
|
abstract String |
getTabindex()
Position of this element in the tabbing order for the current document.
|
abstract TimeZone |
getTimeZone()
Used for current date calculations
|
abstract String |
getTodayControlMode()
This attribute defines the mode for "today" control.
|
abstract Object |
getWeekDayLabels()
List of the day names displays on the days bar in the following way "Sun, Mon, Tue, Wed,"
|
abstract Object |
getWeekDayLabelsShort()
Attribute that allows to customize short names of the weekdays.
|
abstract boolean |
isDisabled()
If "true", rendered is disabled.
|
abstract boolean |
isEnableManualInput()
If "true" calendar input will be editable and it will be possible to change the date manually.
|
abstract boolean |
isPopup()
If "true", the calendar will be rendered initially as hidden with additional elements for calling as popup
|
abstract boolean |
isReadonly()
If "true".
|
abstract boolean |
isResetTimeOnDateSelect()
If value is true then calendar should change time to defaultTime for newly-selected dates
|
abstract boolean |
isShowApplyButton()
If false ApplyButton should not be shown
|
abstract boolean |
isShowFooter()
If false Calendar's footer should not be shown
|
abstract boolean |
isShowHeader()
If false Calendar's header should not be shown
|
abstract boolean |
isShowInput()
"false" value for this attribute makes text field invisible.
|
abstract boolean |
isShowWeekDaysBar()
If false this bar should not be shown
|
abstract boolean |
isShowWeeksBar()
If false this bar should not be shown
|
void |
removeCurrentDateChangeListener(CurrentDateChangeListener listener) |
String |
resolveClientId(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent contextComponent,
String metaComponentId)
Resolves and returns string identifying supported meta-component or
null if provided meta-component name is
not a supported one. |
abstract void |
setCurrentDate(Object date) |
void |
setLocale(Object locale) |
abstract void |
setPreloadDateRangeBegin(Object date) |
abstract void |
setPreloadDateRangeEnd(Object date) |
String |
substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent contextComponent,
String metaComponentId)
Provides replacement for unresolved meta-component names.
|
void |
updateCurrentDate(javax.faces.context.FacesContext facesContext,
Object currentDate) |
boolean |
visitTree(javax.faces.component.visit.VisitContext context,
javax.faces.component.visit.VisitCallback callback) |
addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getFamily, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValue, 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, setConverter
addClientBehavior, addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, 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, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOnhide, getOnshow
getZindex
getDirection, getHorizontalOffset, getJointPoint, getVerticalOffset
getStyleClass
getStyle
public static final String DAYSDATA_META_COMPONENT_ID
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public static final String SUB_TIME_PATTERN
public static final String TIME_PATTERN
public static final String DEFAULT_DATE_PATTERN
public abstract String getDatePattern()
public abstract TimeZone getTimeZone()
Used for current date calculations
Default value is "getDefaultTimeZone()"
public abstract int getFirstWeekDay()
Determines the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France. Possible values should be integers from 0 to 6, 0 corresponds to Sunday
Default value is "getDefaultFirstWeekDay()"
public abstract int getMinDaysInFirstWeek()
Gets what the minimal days required in the first week of the year are; e.g., if the first week is defined as one that contains the first day of the first month of a year, this method returns 1. If the minimal days required must be a full week, this method returns 7.
Default value is "getDefaultMinDaysInFirstWeek()"
public abstract String getTodayControlMode()
This attribute defines the mode for "today" control. Possible values are "scroll", "select", "hidden"
Default value is "select"
public abstract boolean isShowWeekDaysBar()
If false this bar should not be shown
Default value is "true"
public abstract boolean isShowWeeksBar()
If false this bar should not be shown
Default value is "true"
public abstract boolean isShowFooter()
If false Calendar's footer should not be shown
Default value is "true"
public abstract boolean isShowHeader()
If false Calendar's header should not be shown
Default value is "true"
public abstract boolean isShowInput()
"false" value for this attribute makes text field invisible. It works only if popupMode="true" If showInput is "true" - input field will be shown
Default value is "true"
public abstract boolean isPopup()
If "true", the calendar will be rendered initially as hidden with additional elements for calling as popup
Default value is "true"
public abstract boolean isDisabled()
If "true", rendered is disabled. In "popup" mode both controls are disabled
Default value is "false"
public abstract boolean isEnableManualInput()
If "true" calendar input will be editable and it will be possible to change the date manually. If "false" the text field will be "read-only", so the value can be changed only from a handle.
Default value is "false"
public abstract boolean isReadonly()
If "true". Date and time are not selectable. In "popup" mode input is disabled and button is enabled.
Default value is "false"
public abstract String getDayDisableFunction()
The javascript function that enables or disables a day cell
public abstract boolean isShowApplyButton()
If false ApplyButton should not be shown
Default value is "false"
public abstract boolean isResetTimeOnDateSelect()
If value is true then calendar should change time to defaultTime for newly-selected dates
Default value is "false"
public abstract String getBoundaryDatesMode()
This attribute is responsible for behaviour of dates from the previous and next months which are displayed in the current month. Valid values are "inactive" (Default) dates inactive and gray colored, "scroll" boundaries work as month scrolling controls, and "select" boundaries work in the same way as "scroll" but with the date clicked selection
Default value is "inactive"
public abstract AbstractCalendar.Mode getMode()
Valid values: ajax or client
Default value is "client"
public abstract String getDefaultLabel()
public abstract String getPopupStyle()
public abstract String getPopupClass()
public abstract Object getMonthLabels()
public abstract Object getMonthLabelsShort()
public abstract Object getWeekDayLabelsShort()
public abstract Object getWeekDayLabels()
public abstract String getDayClassFunction()
public abstract String getTabindex()
public abstract String getInputStyle()
public abstract String getButtonClass()
public abstract String getInputClass()
public abstract String getButtonLabel()
public abstract String getInputSize()
public abstract Object getCurrentDate()
public abstract void setCurrentDate(Object date)
public abstract String getButtonIcon()
public abstract String getButtonDisabledIcon()
public abstract Object getDefaultTime()
Defines time that will be used:
Default value is "getDefaultValueOfDefaultTime()"
public abstract Object getPreloadDateRangeBegin()
Defines the last range of date which will be loaded to client from dataModel under rendering
Default value is "getDefaultPreloadEnd(getCurrentDateOrDefault())"
public abstract void setPreloadDateRangeBegin(Object date)
public abstract Object getPreloadDateRangeEnd()
Define the initial range of date which will be loaded to client from dataModel under rendering
Default value is "getDefaultPreloadBegin(getCurrentDateOrDefault())"
public abstract void setPreloadDateRangeEnd(Object date)
public abstract CalendarDataModel getDataModel()
public abstract String getOninputclick()
public abstract String getOninputdblclick()
public abstract String getOninputchange()
public abstract String getOninputselect()
public abstract String getOninputmousedown()
public abstract String getOninputmousemove()
public abstract String getOninputmouseout()
public abstract String getOninputmouseover()
public abstract String getOninputmouseup()
public abstract String getOninputkeydown()
public abstract String getOninputkeypress()
public abstract String getOninputkeyup()
public abstract String getOninputfocus()
public abstract String getOninputblur()
public abstract String getOnchange()
public abstract String getOndateselect()
public abstract String getOnbeforedateselect()
public abstract String getOncurrentdateselect()
public abstract String getOnbeforecurrentdateselect()
public abstract String getOncomplete()
public abstract String getOndatemouseout()
public abstract String getOndatemouseover()
public abstract String getOntimeselect()
public abstract String getOnbeforetimeselect()
public abstract String getOnclean()
public Object getLocale()
Used for locale definition
Default value is "getDefaultLocale()"
public void setLocale(Object locale)
public void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException
broadcast
in class javax.faces.component.UIComponentBase
javax.faces.event.AbortProcessingException
public void updateCurrentDate(javax.faces.context.FacesContext facesContext, Object currentDate)
public void addCurrentDateChangeListener(CurrentDateChangeListener listener)
public void removeCurrentDateChangeListener(CurrentDateChangeListener listener)
public CurrentDateChangeListener[] getCurrentDateChangeListeners()
public static Object getDefaultValueOfDefaultTime(javax.faces.context.FacesContext facesContext, AbstractCalendar calendarComponent)
public Date getCurrentDateOrDefault()
public String resolveClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolver
null
if provided meta-component name is
not a supported one.resolveClientId
in interface MetaComponentResolver
facesContext
- - current instance of FacesContext
contextComponent
- - instance of UIComponent
that requested resolution of meta-componentmetaComponentId
- - name of meta-component (without leading '@' sign)null
public String substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolver
null
substituteUnresolvedClientId
in interface MetaComponentResolver
facesContext
- - current instance of FacesContext
contextComponent
- - instance of UIComponent
that requested resolution of meta-componentmetaComponentId
- - name of meta-component (without leading '@' sign)null
public boolean visitTree(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)
visitTree
in class javax.faces.component.UIComponent
public void encodeMetaComponent(javax.faces.context.FacesContext context, String metaComponentId) throws IOException
encodeMetaComponent
in interface MetaComponentEncoder
IOException
public Object getPreload()
public ArrayList<Object> deleteEmptyPropeties(CalendarDataModelItem[] calendarDataModelItems)
public Date[] getPreloadDateRange()
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.