org.apache.myfaces.custom.calendar
Class AbstractHtmlInputCalendar

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by javax.faces.component.html.HtmlInputText
                      extended by org.apache.myfaces.component.html.ext.AbstractHtmlInputText
                          extended by org.apache.myfaces.component.html.ext.HtmlInputText
                              extended by org.apache.myfaces.custom.calendar.AbstractHtmlInputCalendar
All Implemented Interfaces:
EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.EditableValueHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, org.apache.myfaces.component.AlignProperty, org.apache.myfaces.component.DataProperties, org.apache.myfaces.component.DisplayValueOnlyAware, org.apache.myfaces.component.ForceIdAware, LibraryLocationAware, org.apache.myfaces.component.LocationAware, org.apache.myfaces.component.UserRoleAware, org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable

public abstract class AbstractHtmlInputCalendar
extends org.apache.myfaces.component.html.ext.HtmlInputText
implements org.apache.myfaces.component.UserRoleAware, org.apache.myfaces.component.LocationAware, org.apache.myfaces.component.AlignProperty, LibraryLocationAware

Provides a calendar. The calendar can be "inline", or a button can be rendered that displays the calendar in a "popup window" when clicked. Javascript is required for the popup window.

The two forms of calendar are unfortunately not well integrated; this component is effectively two components that happen to use the same component class. Some attributes on the component are applicable only to the inline form while others are applicable only to the popup form.

The appearance of the inline calendar can be controlled via attributes such as currentDayCellClass, dayCellClass, weekRowClass, monthYearRowClass. Attributes "styleLocation", "javascriptLocation", "imageLocation" and all attributes starting with "popup" have no effect on an inline calendar.

Other styling attributes (eg dayCellClass, weekRowClass) are ignored for the popup calendar.

Unless otherwise specified, all attributes accept static values or EL expressions.

Since:
1.1.7
Version:
$Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (miƩ, 03 sep 2008) $
Author:
Martin Marinschek (latest modification by $Author: lu4242 $)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.myfaces.component.html.ext.HtmlInputText
org.apache.myfaces.component.html.ext.HtmlInputText.PropertyKeys
 
Field Summary
static String COMPONENT_TYPE
           
 
Fields inherited from class org.apache.myfaces.component.html.ext.HtmlInputText
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Fields inherited from interface org.apache.myfaces.component.UserRoleAware
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR
 
Fields inherited from interface org.apache.myfaces.component.LibraryLocationAware
IMAGE_LIBRARY_ATTR, JAVASCRIPT_LIBRARY_ATTR, STYLE_LIBRARY_ATTR
 
Fields inherited from interface org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable
DISPLAY_VALUE_ONLY_ATTR, DISPLAY_VALUE_ONLY_STYLE_ATTR, DISPLAY_VALUE_ONLY_STYLE_CLASS_ATTR
 
Constructor Summary
AbstractHtmlInputCalendar()
           
 
Method Summary
abstract  String getCurrentDayCellClass()
          CSS class to be used for the TD element of the currently selected date.
abstract  org.apache.myfaces.custom.calendar.DateBusinessConverter getDateBusinessConverter()
          Indicate an object used as a bridge between the java.util.Date instance used by this component internally and the value object used on the bean, referred as a "business" value.
abstract  String getDayCellClass()
          CSS class to be used for the TD element containing a day days.
abstract  String getHelpText()
          The text that will be rendered in the field - helping the user to find the right format to enter into the field.
abstract  String getMonthYearRowClass()
          CSS class to be used on the TR element for the header-row showing month and year.
abstract  String getPopupButtonImageUrl()
          Url to the image for this popupButton.
abstract  String getPopupButtonString()
          Defines the string displayed on the button which leads to the calendar-popup-window (...
abstract  String getPopupButtonStyle()
          Defines the css style for the button which leads to the calendar-popup-window.
abstract  String getPopupButtonStyleClass()
          Defines the css style class for the button which leads to the calendar-popup-window.
abstract  String getPopupDateFormat()
          Defines the date format used by the java-script popup on client.
abstract  String getPopupGotoString()
          Set the string for "Go To Current Month"
abstract  String getPopupScrollLeftMessage()
          Set the string for scrolling to the left.
abstract  String getPopupScrollRightMessage()
          Set the string for scrolling to the right.
abstract  String getPopupSelectDateMessage()
          Set the string for "Select [date] as date" (do not replace [date], it will be replaced by the current date).
abstract  String getPopupSelectMode()
           May be "day", "week", "month" or "none": day (default): allow the user to select a day. week: only allow the user to select a week. month: only allow the user to select a month. none: equivalent to "readonly".
abstract  String getPopupSelectMonthMessage()
          Set the string for "Click to select a month".
abstract  String getPopupSelectYearMessage()
          Set the string for "Click to select a year".
abstract  String getPopupTheme()
          Set the theme-prefix for this component.
abstract  String getPopupTodayDateFormat()
          Defines the date format used by the java-script popup on client for the today-is string.
abstract  String getPopupTodayString()
          Set the string for "Today is"
abstract  String getPopupWeekString()
          Set the string for "Wk"
abstract  String getWeekRowClass()
          CSS class to be used on the TR element for the header-row showing the week-days.
abstract  boolean isAddResources()
          Automatically add the input-calendar scripts and css files to the header - set that to false to provide the scripts yourself.
abstract  boolean isPopupLeft()
          Render the input-calendar left of the button, not right like normally done.
abstract  boolean isRenderAsPopup()
          Render the input-calendar as a java-script popup on client.
 boolean isRendered()
           
abstract  boolean isRenderPopupButtonAsImage()
          If true, renders a calendar icon instead of the button to pop up the calendar.
abstract  void setAddResources(boolean value)
           
 void setAddResources(Boolean value)
           
abstract  void setDateBusinessConverter(org.apache.myfaces.custom.calendar.DateBusinessConverter dateBusinessConverter)
           
 
Methods inherited from class org.apache.myfaces.component.html.ext.HtmlInputText
addClientBehavior, getAccesskey, getAlign, getAlt, getAutocomplete, getDatafld, getDataformatas, getDatasrc, getDir, getDisplayValueOnly, getDisplayValueOnlyStyle, getDisplayValueOnlyStyleClass, getEnabledOnUserRole, getFamily, getLabel, getLang, getMaxlength, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getSize, getStyle, getStyleClass, getTabindex, getTitle, getVisibleOnUserRole, isDisabled, isDisabledOnClientSide, isForceId, isForceIdIndex, isReadonly, setAccesskey, setAlign, setAlt, setAutocomplete, setDatafld, setDataformatas, setDatasrc, setDir, setDisabled, setDisabledOnClientSide, setDisplayValueOnly, setDisplayValueOnlyStyle, setDisplayValueOnlyStyleClass, setEnabledOnUserRole, setForceId, setForceIdIndex, setLabel, setLang, setMaxlength, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setSize, setStyle, setStyleClass, setTabindex, setTitle, setValueBinding, setValueExpression, setVisibleOnUserRole
 
Methods inherited from class org.apache.myfaces.component.html.ext.AbstractHtmlInputText
getClientId, isDisplayValueOnly, isSetDisplayValueOnly, setDisplayValueOnly
 
Methods inherited from class javax.faces.component.html.HtmlInputText
getDefaultEventName, getEventNames
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, 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
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.component.UserRoleAware
getEnabledOnUserRole, getVisibleOnUserRole, setEnabledOnUserRole, setVisibleOnUserRole
 
Methods inherited from interface org.apache.myfaces.component.LocationAware
getImageLocation, getJavascriptLocation, getStyleLocation
 
Methods inherited from interface org.apache.myfaces.component.AlignProperty
getAlign
 
Methods inherited from interface org.apache.myfaces.component.LibraryLocationAware
getImageLibrary, getJavascriptLibrary, getStyleLibrary
 
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
getClientBehaviors
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

AbstractHtmlInputCalendar

public AbstractHtmlInputCalendar()
Method Detail

isRendered

public boolean isRendered()
Overrides:
isRendered in class org.apache.myfaces.component.html.ext.AbstractHtmlInputText

getDateBusinessConverter

public abstract org.apache.myfaces.custom.calendar.DateBusinessConverter getDateBusinessConverter()
Indicate an object used as a bridge between the java.util.Date instance used by this component internally and the value object used on the bean, referred as a "business" value.


setDateBusinessConverter

public abstract void setDateBusinessConverter(org.apache.myfaces.custom.calendar.DateBusinessConverter dateBusinessConverter)

getMonthYearRowClass

public abstract String getMonthYearRowClass()
CSS class to be used on the TR element for the header-row showing month and year.


getWeekRowClass

public abstract String getWeekRowClass()
CSS class to be used on the TR element for the header-row showing the week-days.


getDayCellClass

public abstract String getDayCellClass()
CSS class to be used for the TD element containing a day days.


getCurrentDayCellClass

public abstract String getCurrentDayCellClass()
CSS class to be used for the TD element of the currently selected date.


isPopupLeft

public abstract boolean isPopupLeft()
Render the input-calendar left of the button, not right like normally done.


isRenderAsPopup

public abstract boolean isRenderAsPopup()
Render the input-calendar as a java-script popup on client.


isAddResources

public abstract boolean isAddResources()
Automatically add the input-calendar scripts and css files to the header - set that to false to provide the scripts yourself.


setAddResources

public abstract void setAddResources(boolean value)

setAddResources

public void setAddResources(Boolean value)

getPopupButtonString

public abstract String getPopupButtonString()
Defines the string displayed on the button which leads to the calendar-popup-window (... by default).


getPopupButtonStyle

public abstract String getPopupButtonStyle()
Defines the css style for the button which leads to the calendar-popup-window.


getPopupButtonStyleClass

public abstract String getPopupButtonStyleClass()
Defines the css style class for the button which leads to the calendar-popup-window.


isRenderPopupButtonAsImage

public abstract boolean isRenderPopupButtonAsImage()
If true, renders a calendar icon instead of the button to pop up the calendar.


getPopupDateFormat

public abstract String getPopupDateFormat()
Defines the date format used by the java-script popup on client.


getPopupGotoString

public abstract String getPopupGotoString()
Set the string for "Go To Current Month"


getPopupTodayString

public abstract String getPopupTodayString()
Set the string for "Today is"


getPopupTodayDateFormat

public abstract String getPopupTodayDateFormat()
Defines the date format used by the java-script popup on client for the today-is string.


getPopupWeekString

public abstract String getPopupWeekString()
Set the string for "Wk"


getPopupScrollLeftMessage

public abstract String getPopupScrollLeftMessage()
Set the string for scrolling to the left.


getPopupScrollRightMessage

public abstract String getPopupScrollRightMessage()
Set the string for scrolling to the right.


getPopupSelectMonthMessage

public abstract String getPopupSelectMonthMessage()
Set the string for "Click to select a month".


getPopupSelectYearMessage

public abstract String getPopupSelectYearMessage()
Set the string for "Click to select a year".


getPopupSelectDateMessage

public abstract String getPopupSelectDateMessage()
Set the string for "Select [date] as date" (do not replace [date], it will be replaced by the current date).


getPopupTheme

public abstract String getPopupTheme()
Set the theme-prefix for this component.


getPopupButtonImageUrl

public abstract String getPopupButtonImageUrl()
Url to the image for this popupButton.


getHelpText

public abstract String getHelpText()
The text that will be rendered in the field - helping the user to find the right format to enter into the field.


getPopupSelectMode

public abstract String getPopupSelectMode()

May be "day", "week", "month" or "none":



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.