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:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, AlignProperty, DataProperties, DisplayValueOnlyAware, ForceIdAware, LocationAware, UserRoleAware, DisplayValueOnlyCapable
Direct Known Subclasses:
HtmlInputCalendar

public abstract class AbstractHtmlInputCalendar
extends HtmlInputText
implements UserRoleAware, LocationAware, AlignProperty

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: 990311 $ $Date: 2010-08-27 21:04:55 -0500 (Fri, 27 Aug 2010) $
Author:
Martin Marinschek (latest modification by $Author: lu4242 $)

Field Summary
static java.lang.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
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
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.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  java.lang.String getCurrentDayCellClass()
          CSS class to be used for the TD element of the currently selected date.
abstract  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  java.lang.String getDayCellClass()
          CSS class to be used for the TD element containing a day days.
abstract  java.lang.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  java.lang.String getMonthYearRowClass()
          CSS class to be used on the TR element for the header-row showing month and year.
abstract  java.lang.String getPopupButtonImageUrl()
          Url to the image for this popupButton.
abstract  java.lang.String getPopupButtonString()
          Defines the string displayed on the button which leads to the calendar-popup-window (...
abstract  java.lang.String getPopupButtonStyle()
          Defines the css style for the button which leads to the calendar-popup-window.
abstract  java.lang.String getPopupButtonStyleClass()
          Defines the css style class for the button which leads to the calendar-popup-window.
abstract  java.lang.String getPopupDateFormat()
          Defines the date format used by the java-script popup on client.
abstract  java.lang.String getPopupGotoString()
          Set the string for "Go To Current Month"
abstract  java.lang.String getPopupScrollLeftMessage()
          Set the string for scrolling to the left.
abstract  java.lang.String getPopupScrollRightMessage()
          Set the string for scrolling to the right.
abstract  java.lang.String getPopupSelectDateMessage()
          Set the string for "Select [date] as date" (do not replace [date], it will be replaced by the current date).
abstract  java.lang.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  java.lang.String getPopupSelectMonthMessage()
          Set the string for "Click to select a month".
abstract  java.lang.String getPopupSelectYearMessage()
          Set the string for "Click to select a year".
abstract  java.lang.String getPopupTheme()
          Set the theme-prefix for this component.
abstract  java.lang.String getPopupTodayDateFormat()
          Defines the date format used by the java-script popup on client for the today-is string.
abstract  java.lang.String getPopupTodayString()
          Set the string for "Today is"
abstract  java.lang.String getPopupWeekString()
          Set the string for "Wk"
abstract  java.lang.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(java.lang.Boolean value)
           
abstract  void setDateBusinessConverter(DateBusinessConverter dateBusinessConverter)
           
 
Methods inherited from class org.apache.myfaces.component.html.ext.HtmlInputText
getAlign, getAutocomplete, getDatafld, getDataformatas, getDatasrc, getDisplayValueOnly, getDisplayValueOnlyStyle, getDisplayValueOnlyStyleClass, getEnabledOnUserRole, getFamily, getVisibleOnUserRole, isDisabledOnClientSide, isForceId, isForceIdIndex, restoreState, saveState, setAlign, setAutocomplete, setDatafld, setDataformatas, setDatasrc, setDisabledOnClientSide, setDisplayValueOnly, setDisplayValueOnlyStyle, setDisplayValueOnlyStyleClass, setEnabledOnUserRole, setForceId, setForceIdIndex, 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
getAccesskey, getAlt, getDir, getLabel, getLang, getMaxlength, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getSize, getStyle, getStyleClass, getTabindex, getTitle, isDisabled, isReadonly, setAccesskey, setAlt, setDir, setDisabled, setLabel, setLang, setMaxlength, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setSize, setStyle, setStyleClass, setTabindex, setTitle
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, 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, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
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 javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_TYPE

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

AbstractHtmlInputCalendar

public AbstractHtmlInputCalendar()
Method Detail

isRendered

public boolean isRendered()
Overrides:
isRendered in class AbstractHtmlInputText

getDateBusinessConverter

public abstract 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(DateBusinessConverter dateBusinessConverter)

getMonthYearRowClass

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


getWeekRowClass

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


getDayCellClass

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


getCurrentDayCellClass

public abstract java.lang.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(java.lang.Boolean value)

getPopupButtonString

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


getPopupButtonStyle

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


getPopupButtonStyleClass

public abstract java.lang.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 java.lang.String getPopupDateFormat()
Defines the date format used by the java-script popup on client.


getPopupGotoString

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


getPopupTodayString

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


getPopupTodayDateFormat

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


getPopupWeekString

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


getPopupScrollLeftMessage

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


getPopupScrollRightMessage

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


getPopupSelectMonthMessage

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


getPopupSelectYearMessage

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


getPopupSelectDateMessage

public abstract java.lang.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 java.lang.String getPopupTheme()
Set the theme-prefix for this component.


getPopupButtonImageUrl

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


getHelpText

public abstract java.lang.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 java.lang.String getPopupSelectMode()

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



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