org.apache.myfaces.custom.calendar
Class HtmlInputCalendar

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
                                  extended by org.apache.myfaces.custom.calendar.HtmlInputCalendar
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, AlignProperty, DataProperties, DisplayValueOnlyAware, ForceIdAware, LocationAware, UserRoleAware, DisplayValueOnlyCapable

public class HtmlInputCalendar
extends AbstractHtmlInputCalendar


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
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
HtmlInputCalendar()
           
 
Method Summary
 java.lang.String getAlign()
          HTML: Specifies the horizontal alignment of this element.
 java.lang.String getCurrentDayCellClass()
          CSS class to be used for the TD element of the currently selected date.
 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.
 java.lang.String getDayCellClass()
          CSS class to be used for the TD element containing a day days.
 java.lang.String getEnabledOnUserRole()
          If user is in given role, this component will be rendered normally.
 java.lang.String getFamily()
           
 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.
 java.lang.String getImageLocation()
          An alternate location to find image resources.
 java.lang.String getJavascriptLocation()
          An alternate location to find javascript resources.
 java.lang.String getMonthYearRowClass()
          CSS class to be used on the TR element for the header-row showing month and year.
 java.lang.String getPopupButtonImageUrl()
          Url to the image for this popupButton.
 java.lang.String getPopupButtonString()
          Defines the string displayed on the button which leads to the calendar-popup-window (...
 java.lang.String getPopupButtonStyle()
          Defines the css style for the button which leads to the calendar-popup-window.
 java.lang.String getPopupButtonStyleClass()
          Defines the css style class for the button which leads to the calendar-popup-window.
 java.lang.String getPopupDateFormat()
          Defines the date format used by the java-script popup on client.
 java.lang.String getPopupGotoString()
          Set the string for "Go To Current Month"
 java.lang.String getPopupScrollLeftMessage()
          Set the string for scrolling to the left.
 java.lang.String getPopupScrollRightMessage()
          Set the string for scrolling to the right.
 java.lang.String getPopupSelectDateMessage()
          Set the string for "Select [date] as date" (do not replace [date], it will be replaced by the current date).
 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".
 java.lang.String getPopupSelectMonthMessage()
          Set the string for "Click to select a month".
 java.lang.String getPopupSelectYearMessage()
          Set the string for "Click to select a year".
 java.lang.String getPopupTheme()
          Set the theme-prefix for this component.
 java.lang.String getPopupTodayDateFormat()
          Defines the date format used by the java-script popup on client for the today-is string.
 java.lang.String getPopupTodayString()
          Set the string for "Today is"
 java.lang.String getPopupWeekString()
          Set the string for "Wk"
 java.lang.String getStyleLocation()
          An alternate location to find stylesheet resources.
 java.lang.String getVisibleOnUserRole()
          If user is in given role, this component will be rendered normally.
 java.lang.String getWeekRowClass()
          CSS class to be used on the TR element for the header-row showing the week-days.
 boolean isAddResources()
          Automatically add the input-calendar scripts and css files to the header - set that to false to provide the scripts yourself.
 boolean isPopupLeft()
          Render the input-calendar left of the button, not right like normally done.
 boolean isRenderAsPopup()
          Render the input-calendar as a java-script popup on client.
 boolean isRenderPopupButtonAsImage()
          If true, renders a calendar icon instead of the button to pop up the calendar.
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setAddResources(boolean addResources)
           
 void setAlign(java.lang.String align)
           
 void setCurrentDayCellClass(java.lang.String currentDayCellClass)
           
 void setDateBusinessConverter(DateBusinessConverter dateBusinessConverter)
           
 void setDayCellClass(java.lang.String dayCellClass)
           
 void setEnabledOnUserRole(java.lang.String enabledOnUserRole)
           
 void setHelpText(java.lang.String helpText)
           
 void setImageLocation(java.lang.String imageLocation)
           
 void setJavascriptLocation(java.lang.String javascriptLocation)
           
 void setMonthYearRowClass(java.lang.String monthYearRowClass)
           
 void setPopupButtonImageUrl(java.lang.String popupButtonImageUrl)
           
 void setPopupButtonString(java.lang.String popupButtonString)
           
 void setPopupButtonStyle(java.lang.String popupButtonStyle)
           
 void setPopupButtonStyleClass(java.lang.String popupButtonStyleClass)
           
 void setPopupDateFormat(java.lang.String popupDateFormat)
           
 void setPopupGotoString(java.lang.String popupGotoString)
           
 void setPopupLeft(boolean popupLeft)
           
 void setPopupScrollLeftMessage(java.lang.String popupScrollLeftMessage)
           
 void setPopupScrollRightMessage(java.lang.String popupScrollRightMessage)
           
 void setPopupSelectDateMessage(java.lang.String popupSelectDateMessage)
           
 void setPopupSelectMode(java.lang.String popupSelectMode)
           
 void setPopupSelectMonthMessage(java.lang.String popupSelectMonthMessage)
           
 void setPopupSelectYearMessage(java.lang.String popupSelectYearMessage)
           
 void setPopupTheme(java.lang.String popupTheme)
           
 void setPopupTodayDateFormat(java.lang.String popupTodayDateFormat)
           
 void setPopupTodayString(java.lang.String popupTodayString)
           
 void setPopupWeekString(java.lang.String popupWeekString)
           
 void setRenderAsPopup(boolean renderAsPopup)
           
 void setRenderPopupButtonAsImage(boolean renderPopupButtonAsImage)
           
 void setStyleLocation(java.lang.String styleLocation)
           
 void setVisibleOnUserRole(java.lang.String visibleOnUserRole)
           
 void setWeekRowClass(java.lang.String weekRowClass)
           
 
Methods inherited from class org.apache.myfaces.custom.calendar.AbstractHtmlInputCalendar
isRendered, setAddResources
 
Methods inherited from class org.apache.myfaces.component.html.ext.HtmlInputText
getAutocomplete, getDatafld, getDataformatas, getDatasrc, getDisplayValueOnly, getDisplayValueOnlyStyle, getDisplayValueOnlyStyleClass, isDisabledOnClientSide, isForceId, isForceIdIndex, setAutocomplete, setDatafld, setDataformatas, setDatasrc, setDisabledOnClientSide, setDisplayValueOnly, setDisplayValueOnlyStyle, setDisplayValueOnlyStyleClass, setForceId, setForceIdIndex
 
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, 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, 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, getSubmittedValue, getValidator, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, 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, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

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

DEFAULT_RENDERER_TYPE

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

HtmlInputCalendar

public HtmlInputCalendar()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class HtmlInputText

getDateBusinessConverter

public DateBusinessConverter getDateBusinessConverter()
Description copied from class: AbstractHtmlInputCalendar
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.

Specified by:
getDateBusinessConverter in class AbstractHtmlInputCalendar

setDateBusinessConverter

public void setDateBusinessConverter(DateBusinessConverter dateBusinessConverter)
Specified by:
setDateBusinessConverter in class AbstractHtmlInputCalendar

getMonthYearRowClass

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

Specified by:
getMonthYearRowClass in class AbstractHtmlInputCalendar

setMonthYearRowClass

public void setMonthYearRowClass(java.lang.String monthYearRowClass)

getWeekRowClass

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

Specified by:
getWeekRowClass in class AbstractHtmlInputCalendar

setWeekRowClass

public void setWeekRowClass(java.lang.String weekRowClass)

getDayCellClass

public java.lang.String getDayCellClass()
Description copied from class: AbstractHtmlInputCalendar
CSS class to be used for the TD element containing a day days.

Specified by:
getDayCellClass in class AbstractHtmlInputCalendar

setDayCellClass

public void setDayCellClass(java.lang.String dayCellClass)

getCurrentDayCellClass

public java.lang.String getCurrentDayCellClass()
Description copied from class: AbstractHtmlInputCalendar
CSS class to be used for the TD element of the currently selected date.

Specified by:
getCurrentDayCellClass in class AbstractHtmlInputCalendar

setCurrentDayCellClass

public void setCurrentDayCellClass(java.lang.String currentDayCellClass)

isPopupLeft

public boolean isPopupLeft()
Description copied from class: AbstractHtmlInputCalendar
Render the input-calendar left of the button, not right like normally done.

Specified by:
isPopupLeft in class AbstractHtmlInputCalendar

setPopupLeft

public void setPopupLeft(boolean popupLeft)

isRenderAsPopup

public boolean isRenderAsPopup()
Description copied from class: AbstractHtmlInputCalendar
Render the input-calendar as a java-script popup on client.

Specified by:
isRenderAsPopup in class AbstractHtmlInputCalendar

setRenderAsPopup

public void setRenderAsPopup(boolean renderAsPopup)

isAddResources

public boolean isAddResources()
Description copied from class: AbstractHtmlInputCalendar
Automatically add the input-calendar scripts and css files to the header - set that to false to provide the scripts yourself.

Specified by:
isAddResources in class AbstractHtmlInputCalendar

setAddResources

public void setAddResources(boolean addResources)
Specified by:
setAddResources in class AbstractHtmlInputCalendar

getPopupButtonString

public java.lang.String getPopupButtonString()
Description copied from class: AbstractHtmlInputCalendar
Defines the string displayed on the button which leads to the calendar-popup-window (... by default).

Specified by:
getPopupButtonString in class AbstractHtmlInputCalendar

setPopupButtonString

public void setPopupButtonString(java.lang.String popupButtonString)

getPopupButtonStyle

public java.lang.String getPopupButtonStyle()
Description copied from class: AbstractHtmlInputCalendar
Defines the css style for the button which leads to the calendar-popup-window.

Specified by:
getPopupButtonStyle in class AbstractHtmlInputCalendar

setPopupButtonStyle

public void setPopupButtonStyle(java.lang.String popupButtonStyle)

getPopupButtonStyleClass

public java.lang.String getPopupButtonStyleClass()
Description copied from class: AbstractHtmlInputCalendar
Defines the css style class for the button which leads to the calendar-popup-window.

Specified by:
getPopupButtonStyleClass in class AbstractHtmlInputCalendar

setPopupButtonStyleClass

public void setPopupButtonStyleClass(java.lang.String popupButtonStyleClass)

isRenderPopupButtonAsImage

public boolean isRenderPopupButtonAsImage()
Description copied from class: AbstractHtmlInputCalendar
If true, renders a calendar icon instead of the button to pop up the calendar.

Specified by:
isRenderPopupButtonAsImage in class AbstractHtmlInputCalendar

setRenderPopupButtonAsImage

public void setRenderPopupButtonAsImage(boolean renderPopupButtonAsImage)

getPopupDateFormat

public java.lang.String getPopupDateFormat()
Description copied from class: AbstractHtmlInputCalendar
Defines the date format used by the java-script popup on client.

Specified by:
getPopupDateFormat in class AbstractHtmlInputCalendar

setPopupDateFormat

public void setPopupDateFormat(java.lang.String popupDateFormat)

getPopupGotoString

public java.lang.String getPopupGotoString()
Description copied from class: AbstractHtmlInputCalendar
Set the string for "Go To Current Month"

Specified by:
getPopupGotoString in class AbstractHtmlInputCalendar

setPopupGotoString

public void setPopupGotoString(java.lang.String popupGotoString)

getPopupTodayString

public java.lang.String getPopupTodayString()
Description copied from class: AbstractHtmlInputCalendar
Set the string for "Today is"

Specified by:
getPopupTodayString in class AbstractHtmlInputCalendar

setPopupTodayString

public void setPopupTodayString(java.lang.String popupTodayString)

getPopupTodayDateFormat

public java.lang.String getPopupTodayDateFormat()
Description copied from class: AbstractHtmlInputCalendar
Defines the date format used by the java-script popup on client for the today-is string.

Specified by:
getPopupTodayDateFormat in class AbstractHtmlInputCalendar

setPopupTodayDateFormat

public void setPopupTodayDateFormat(java.lang.String popupTodayDateFormat)

getPopupWeekString

public java.lang.String getPopupWeekString()
Description copied from class: AbstractHtmlInputCalendar
Set the string for "Wk"

Specified by:
getPopupWeekString in class AbstractHtmlInputCalendar

setPopupWeekString

public void setPopupWeekString(java.lang.String popupWeekString)

getPopupScrollLeftMessage

public java.lang.String getPopupScrollLeftMessage()
Description copied from class: AbstractHtmlInputCalendar
Set the string for scrolling to the left.

Specified by:
getPopupScrollLeftMessage in class AbstractHtmlInputCalendar

setPopupScrollLeftMessage

public void setPopupScrollLeftMessage(java.lang.String popupScrollLeftMessage)

getPopupScrollRightMessage

public java.lang.String getPopupScrollRightMessage()
Description copied from class: AbstractHtmlInputCalendar
Set the string for scrolling to the right.

Specified by:
getPopupScrollRightMessage in class AbstractHtmlInputCalendar

setPopupScrollRightMessage

public void setPopupScrollRightMessage(java.lang.String popupScrollRightMessage)

getPopupSelectMonthMessage

public java.lang.String getPopupSelectMonthMessage()
Description copied from class: AbstractHtmlInputCalendar
Set the string for "Click to select a month".

Specified by:
getPopupSelectMonthMessage in class AbstractHtmlInputCalendar

setPopupSelectMonthMessage

public void setPopupSelectMonthMessage(java.lang.String popupSelectMonthMessage)

getPopupSelectYearMessage

public java.lang.String getPopupSelectYearMessage()
Description copied from class: AbstractHtmlInputCalendar
Set the string for "Click to select a year".

Specified by:
getPopupSelectYearMessage in class AbstractHtmlInputCalendar

setPopupSelectYearMessage

public void setPopupSelectYearMessage(java.lang.String popupSelectYearMessage)

getPopupSelectDateMessage

public java.lang.String getPopupSelectDateMessage()
Description copied from class: AbstractHtmlInputCalendar
Set the string for "Select [date] as date" (do not replace [date], it will be replaced by the current date).

Specified by:
getPopupSelectDateMessage in class AbstractHtmlInputCalendar

setPopupSelectDateMessage

public void setPopupSelectDateMessage(java.lang.String popupSelectDateMessage)

getPopupTheme

public java.lang.String getPopupTheme()
Description copied from class: AbstractHtmlInputCalendar
Set the theme-prefix for this component.

Specified by:
getPopupTheme in class AbstractHtmlInputCalendar

setPopupTheme

public void setPopupTheme(java.lang.String popupTheme)

getPopupButtonImageUrl

public java.lang.String getPopupButtonImageUrl()
Description copied from class: AbstractHtmlInputCalendar
Url to the image for this popupButton.

Specified by:
getPopupButtonImageUrl in class AbstractHtmlInputCalendar

setPopupButtonImageUrl

public void setPopupButtonImageUrl(java.lang.String popupButtonImageUrl)

getHelpText

public java.lang.String getHelpText()
Description copied from class: AbstractHtmlInputCalendar
The text that will be rendered in the field - helping the user to find the right format to enter into the field.

Specified by:
getHelpText in class AbstractHtmlInputCalendar

setHelpText

public void setHelpText(java.lang.String helpText)

getPopupSelectMode

public java.lang.String getPopupSelectMode()
Description copied from class: AbstractHtmlInputCalendar

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

Specified by:
getPopupSelectMode in class AbstractHtmlInputCalendar

setPopupSelectMode

public void setPopupSelectMode(java.lang.String popupSelectMode)

getEnabledOnUserRole

public java.lang.String getEnabledOnUserRole()
Description copied from interface: UserRoleAware
If user is in given role, this component will be rendered normally. If not, no hyperlink is rendered but all nested tags (=body) are rendered.

Specified by:
getEnabledOnUserRole in interface UserRoleAware
Overrides:
getEnabledOnUserRole in class HtmlInputText
Returns:

setEnabledOnUserRole

public void setEnabledOnUserRole(java.lang.String enabledOnUserRole)
Specified by:
setEnabledOnUserRole in interface UserRoleAware
Overrides:
setEnabledOnUserRole in class HtmlInputText

getVisibleOnUserRole

public java.lang.String getVisibleOnUserRole()
Description copied from interface: UserRoleAware
If user is in given role, this component will be rendered normally. If not, nothing is rendered and the body of this tag will be skipped.

Specified by:
getVisibleOnUserRole in interface UserRoleAware
Overrides:
getVisibleOnUserRole in class HtmlInputText
Returns:

setVisibleOnUserRole

public void setVisibleOnUserRole(java.lang.String visibleOnUserRole)
Specified by:
setVisibleOnUserRole in interface UserRoleAware
Overrides:
setVisibleOnUserRole in class HtmlInputText

getJavascriptLocation

public java.lang.String getJavascriptLocation()
Description copied from interface: LocationAware
An alternate location to find javascript resources. If no values is specified, javascript will be loaded from the resources directory using AddResource and ExtensionsFilter.


setJavascriptLocation

public void setJavascriptLocation(java.lang.String javascriptLocation)

getImageLocation

public java.lang.String getImageLocation()
Description copied from interface: LocationAware
An alternate location to find image resources. If no values is specified, images will be loaded from the resources directory using AddResource and ExtensionsFilter.


setImageLocation

public void setImageLocation(java.lang.String imageLocation)

getStyleLocation

public java.lang.String getStyleLocation()
Description copied from interface: LocationAware
An alternate location to find stylesheet resources. If no values is specified, stylesheets will be loaded from the resources directory using AddResource and ExtensionsFilter.


setStyleLocation

public void setStyleLocation(java.lang.String styleLocation)

getAlign

public java.lang.String getAlign()
Description copied from interface: AlignProperty
HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.

Specified by:
getAlign in interface AlignProperty
Overrides:
getAlign in class HtmlInputText

setAlign

public void setAlign(java.lang.String align)
Overrides:
setAlign in class HtmlInputText

saveState

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

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 HtmlInputText


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