ICEfaces ICE Components 3.3.0
Java API Documentation

com.icesoft.faces.component.selectinputdate
Class SelectInputDate

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 com.icesoft.faces.component.ext.HtmlInputText
                          extended by com.icesoft.faces.component.selectinputdate.SelectInputDate
All Implemented Interfaces:
com.icesoft.faces.component.IceExtended, java.util.EventListener, javax.faces.component.ActionSource, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.EditableValueHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, org.icefaces.impl.component.SeriesStateHolder

public class SelectInputDate
extends HtmlInputText
implements org.icefaces.impl.component.SeriesStateHolder

SelectInputDate is a JSF component class that represents an ICEfaces input date selector.

The component extends the ICEfaces extended HTMLPanelGroup.

By default the component is rendered by the "com.icesoft.faces.Calendar" renderer type.

Version:
1.1
Author:
Greg McCleary

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.component.html.HtmlInputText
javax.faces.component.html.HtmlInputText.PropertyKeys
 
Field Summary
static java.lang.String CALENDAR_INPUTTEXT
           
static java.lang.String COMPONENT_FAMILY
          The component family.
static java.lang.String COMPONENT_TYPE
          The component type.
static java.lang.String DEFAULT_POPUP_DATE_FORMAT
          The default date format for the popup input text child component.
 
Fields inherited from class com.icesoft.faces.component.ext.HtmlInputText
focus, partialSubmit, RENDERER_TYPE
 
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
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
 
Fields inherited from interface com.icesoft.faces.component.IceExtended
ENABLED_ON_USER_ROLE_ATTR, RENDERED_ON_USER_ROLE_ATTR
 
Constructor Summary
SelectInputDate()
          Creates an instance and sets renderer type to "com.icesoft.faces.Calendar".
 
Method Summary
 void encodeBegin(javax.faces.context.FacesContext context)
           
 java.lang.String formatDate(java.util.Date date)
          Formats the given date using the default date format MM/dd/yyyy.
 java.lang.String getCalendarInputClass()
           
 java.lang.String getClosePopupClass()
          Returns the style class name applied to the close popup button in the SelectInputDate calendar.
 java.lang.String getClosePopupImage()
          Returns the name of the close popup image.
 java.lang.String getCurrentDayCellClass()
          Returns the currentDayCell style class name.
 java.lang.String getDayCellClass()
          Returns the style class name applied to the day cells in the SelectInputDate calendar.
 java.lang.String getFamily()
           
 java.lang.String getHighlightClass()
          Return the value of the highlightClass property.
 java.lang.String getHighlightUnit()
          Return the value of the highlightUnit property.
 java.lang.String getHighlightValue()
          Return the value of the highlightValue property.
 java.lang.String getImageDir()
           
 java.lang.String getInputTitle()
           
 java.util.Map getLinkMap()
           
 java.lang.String getMonthYearDropdownClass()
           
 java.lang.String getMonthYearRowClass()
          Returns the style class name used for the row containing the month and Year.
 java.lang.String getMoveNextClass()
          Returns the style class name applied to the next month or year button in the SelectInputDate calendar.
 java.lang.String getMoveNextImage()
           
 java.lang.String getMovePrevClass()
          Returns the style class name applied to the previous month or year button in the SelectInputDate calendar.
 java.lang.String getMovePreviousImage()
          Returns the name of the move previous image.
 java.util.Date getNavDate()
          Get the navDate to render a calendar on a navigation event.
 java.lang.String getOpenPopupClass()
          Returns the style class name applied to the open popup button in the SelectInputDate calendar.
 java.lang.String getOpenPopupImage()
          returns the name of the open popup image.
 boolean getPartialSubmit()
          Return the value of the partialSubmit property.
 java.lang.String getPopupDateFormat()
          Returns the date format string of the input text child componenet.
 java.lang.String getSelectedDayLink()
           
protected  java.lang.String getSpecifiedPopupDateFormat()
          If the popupDateFormat was specified, then return that, but not any default values.
 java.lang.String getStyle()
          

CSS style attribute.

 java.lang.String getStyleClass()
          Return the value of the styleClass property.
 java.lang.String getTextToRender()
           
 java.lang.String getTimeClass()
           
 java.lang.String getTimeDropDownClass()
           
 java.lang.String getWeekRowClass()
          Returns the style class name of the weekRowClass The style class is defined in an external style sheet.
 boolean isImageDirSet()
           
 boolean isNavEvent()
          A navEvent value of true indicates that a navEvent has occured.
 boolean isRenderAsPopup()
           
 boolean isRenderMonthAsDropdown()
           
 boolean isRenderWeekNumbers()
           
 boolean isRenderYearAsDropdown()
           
 boolean isShowPopup()
          A showPopup value of true indicates the SelectInputText popup be rendered.
 void requestFocus()
          This method is used to communicate a focus request from the application to the client browser.
 javax.faces.convert.DateTimeConverter resolveDateTimeConverter(javax.faces.context.FacesContext context)
          To properly function, selectInputDate needs to use the same timezone in the inputText field as well as the calendar, which is accomplished by using a javax.faces.convert.DateTimeConverter, which provides the required Converter behaviours, as we as gives access to its TimeZone object.
 java.util.Locale resolveLocale(javax.faces.context.FacesContext context)
           
 java.util.TimeZone resolveTimeZone(javax.faces.context.FacesContext context)
           
 void restoreSeriesState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          Perform any processing required to restore the state from the entries in the state Object.
 java.lang.Object saveSeriesState(javax.faces.context.FacesContext facesContext)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Gets the state of the instance as a Serializable Object.
 void setHighlightClass(java.lang.String highlightClass)
          Set the value of the highlightClass property.
 void setHighlightUnit(java.lang.String highlightUnit)
          Set the value of the highlightUnit property.
 void setHighlightValue(java.lang.String highlightValue)
          Set the value of the highlightValue property.
 void setImageDir(java.lang.String imageDir)
          Sets the directory where the images used by this component are located.
 void setInputTitle(java.lang.String inputTitle)
           
 void setLinkMap(java.util.Map linkMap)
           
 void setNavDate(java.util.Date navDate)
          Set the date value of the navDate.
 void setNavEvent(boolean navEvent)
          Sets the boolean navEvent attribute.
 void setPopupDateFormat(java.lang.String popupDateFormat)
          Sets the date format of the input text child component when the component is in popup mode.
 void setRenderAsPopup(boolean b)
           
 void setRenderMonthAsDropdown(boolean b)
           
 void setRenderWeekNumbers(boolean b)
           
 void setRenderYearAsDropdown(boolean b)
           
 void setSelectedDayLink(java.lang.String selectedDayLink)
           
 void setShowPopup(boolean showPopup)
          Setting the showPopup attribute to true will render the SelectInputDate popup calendar.
 void setStyle(java.lang.String style)
          

CSS style attribute.

 void setStyleClass(java.lang.String styleClass)
          Set the value of the styleClass property.
 void validate(javax.faces.context.FacesContext context)
           
 
Methods inherited from class com.icesoft.faces.component.ext.HtmlInputText
addActionListener, broadcast, changeText, decode, getAction, getActionListener, getActionListeners, getAutocomplete, getCurrentStyle, getEffect, getEnabledOnUserRole, getOnchangeeffect, getOnclickeffect, getOndblclickeffect, getOnkeydowneffect, getOnkeypresseffect, getOnkeyupeffect, getOnmousedowneffect, getOnmousemoveeffect, getOnmouseouteffect, getOnmouseovereffect, getOnmouseupeffect, getRenderedOnUserRole, getStyleClassField, getText, getVisible, hasFocus, isActionKeyEvent, isDisabled, isImmediate, isRendered, queueEvent, removeActionListener, setAction, setActionKeyEvent, setActionListener, setAutocomplete, setCurrentStyle, setEffect, setEnabledOnUserRole, setFocus, setImmediate, setOnchangeeffect, setOnclickeffect, setOndblclickeffect, setOnkeydowneffect, setOnkeypresseffect, setOnkeyupeffect, setOnmousedowneffect, setOnmousemoveeffect, setOnmouseouteffect, setOnmouseovereffect, setOnmouseupeffect, setPartialSubmit, setRenderedOnUserRole, setValueBinding, setVisible
 
Methods inherited from class javax.faces.component.html.HtmlInputText
getAccesskey, getAlt, getDefaultEventName, getDir, getEventNames, getLabel, getLang, getMaxlength, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getSize, getTabindex, getTitle, isReadonly, setAccesskey, setAlt, setDir, setDisabled, setLabel, setLang, setMaxlength, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setSize, setTabindex, setTitle
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, clearInitialState, compareValues, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isEmpty, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class javax.faces.component.UIComponent
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
 
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.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
The component type.

See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
The component family.

See Also:
Constant Field Values

DEFAULT_POPUP_DATE_FORMAT

public static final java.lang.String DEFAULT_POPUP_DATE_FORMAT
The default date format for the popup input text child component.

See Also:
Constant Field Values

CALENDAR_INPUTTEXT

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

SelectInputDate

public SelectInputDate()
Creates an instance and sets renderer type to "com.icesoft.faces.Calendar".

Method Detail

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

getStyle

public java.lang.String getStyle()

CSS style attribute.

Overrides:
getStyle in class javax.faces.component.html.HtmlInputText
Returns:
style

setStyle

public void setStyle(java.lang.String style)

CSS style attribute.

Overrides:
setStyle in class javax.faces.component.html.HtmlInputText
Parameters:
style -
See Also:
getStyle()

formatDate

public java.lang.String formatDate(java.util.Date date)
Formats the given date using the default date format MM/dd/yyyy.

Parameters:
date -
Returns:
the formatted date as a String.

getTextToRender

public java.lang.String getTextToRender()

resolveDateTimeConverter

public javax.faces.convert.DateTimeConverter resolveDateTimeConverter(javax.faces.context.FacesContext context)
To properly function, selectInputDate needs to use the same timezone in the inputText field as well as the calendar, which is accomplished by using a javax.faces.convert.DateTimeConverter, which provides the required Converter behaviours, as we as gives access to its TimeZone object. If developers require a custom Converter, then they must subclass javax.faces.convert.DateTimeConverter.

Returns:
DateTimeConverter

resolveTimeZone

public java.util.TimeZone resolveTimeZone(javax.faces.context.FacesContext context)

resolveLocale

public java.util.Locale resolveLocale(javax.faces.context.FacesContext context)

setNavEvent

public void setNavEvent(boolean navEvent)
Sets the boolean navEvent attribute.

Parameters:
navEvent - a value of true indicates that a navigation event has occured.

isNavEvent

public boolean isNavEvent()
A navEvent value of true indicates that a navEvent has occured.

Returns:
a value of true if a navigation event caused that render.

setNavDate

public void setNavDate(java.util.Date navDate)
Set the date value of the navDate. The navDate is used to render a calendar when the user is navigating from month to month or year to year.

Parameters:
navDate - a Date assigned to the navDate.

getNavDate

public java.util.Date getNavDate()
Get the navDate to render a calendar on a navigation event.

Returns:
the navDate as a Date

setShowPopup

public void setShowPopup(boolean showPopup)
Setting the showPopup attribute to true will render the SelectInputDate popup calendar.

Parameters:
showPopup - a value of true will cause the popup calendar to be rendered

isShowPopup

public boolean isShowPopup()
A showPopup value of true indicates the SelectInputText popup be rendered.

Returns:
the current value showPopup

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIInput

getMonthYearRowClass

public java.lang.String getMonthYearRowClass()
Returns the style class name used for the row containing the month and Year. The style class is defined in an external style sheet.

Returns:
the style class name applied to the monthYearRow. If a monthYearRowClass attribute has not been set the default will be used.

getMonthYearDropdownClass

public java.lang.String getMonthYearDropdownClass()

getTimeClass

public java.lang.String getTimeClass()

getTimeDropDownClass

public java.lang.String getTimeDropDownClass()

getWeekRowClass

public java.lang.String getWeekRowClass()
Returns the style class name of the weekRowClass The style class is defined in an external style sheet.

Returns:
the style class name applied to the weekRow. If a weekRowClass attribute has not been set the default will be used.

getCalendarInputClass

public java.lang.String getCalendarInputClass()
Returns:
the style class name used for the input text of the calendar.

getDayCellClass

public java.lang.String getDayCellClass()
Returns the style class name applied to the day cells in the SelectInputDate calendar.

Returns:
the style class name that is applied to the SelectInputDate day cells

getMovePrevClass

public java.lang.String getMovePrevClass()
Returns the style class name applied to the previous month or year button in the SelectInputDate calendar.

Returns:
the style class name that is applied to the SelectInputDate previous month or year button

getMoveNextClass

public java.lang.String getMoveNextClass()
Returns the style class name applied to the next month or year button in the SelectInputDate calendar.

Returns:
the style class name that is applied to the SelectInputDate next month or year button

getOpenPopupClass

public java.lang.String getOpenPopupClass()
Returns the style class name applied to the open popup button in the SelectInputDate calendar.

Returns:
the style class name that is applied to the SelectInputDate open popup button

getClosePopupClass

public java.lang.String getClosePopupClass()
Returns the style class name applied to the close popup button in the SelectInputDate calendar.

Returns:
the style class name that is applied to the SelectInputDate close popup button

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Description copied from class: HtmlInputText

Set the value of the styleClass property.

Overrides:
setStyleClass in class HtmlInputText

getStyleClass

public java.lang.String getStyleClass()

Return the value of the styleClass property.

Overrides:
getStyleClass in class HtmlInputText
Returns:
styleClass

getCurrentDayCellClass

public java.lang.String getCurrentDayCellClass()
Returns the currentDayCell style class name.

Returns:
style class name used for the current day cell

isRenderAsPopup

public boolean isRenderAsPopup()
Returns:
the value of the renderAsPopup indicator.

setRenderAsPopup

public void setRenderAsPopup(boolean b)
Parameters:
b -

isRenderMonthAsDropdown

public boolean isRenderMonthAsDropdown()

setRenderMonthAsDropdown

public void setRenderMonthAsDropdown(boolean b)

isRenderYearAsDropdown

public boolean isRenderYearAsDropdown()

setRenderYearAsDropdown

public void setRenderYearAsDropdown(boolean b)

isRenderWeekNumbers

public boolean isRenderWeekNumbers()

setRenderWeekNumbers

public void setRenderWeekNumbers(boolean b)

setImageDir

public void setImageDir(java.lang.String imageDir)
Sets the directory where the images used by this component are located.

Parameters:
imageDir - the directory where the images used by this component are located

getImageDir

public java.lang.String getImageDir()
Returns:
the directory name where the images used by this component are located.

isImageDirSet

public boolean isImageDirSet()
Returns:
whether the imageDir attribute has been set.

getMoveNextImage

public java.lang.String getMoveNextImage()
Returns:
the name of the move next image.

getMovePreviousImage

public java.lang.String getMovePreviousImage()
Returns the name of the move previous image.

Returns:
DEFAULT_MOVEPREV

getOpenPopupImage

public java.lang.String getOpenPopupImage()
returns the name of the open popup image.

Returns:
DEFAULT_OPENPOPUP

getClosePopupImage

public java.lang.String getClosePopupImage()
Returns the name of the close popup image.

Returns:
DEFAULT_CLOSEPOPUP

setPopupDateFormat

public void setPopupDateFormat(java.lang.String popupDateFormat)
Sets the date format of the input text child component when the component is in popup mode.

Parameters:
popupDateFormat -

getPopupDateFormat

public java.lang.String getPopupDateFormat()
Returns the date format string of the input text child componenet.

Returns:
_popupDateFormat

getSpecifiedPopupDateFormat

protected java.lang.String getSpecifiedPopupDateFormat()
If the popupDateFormat was specified, then return that, but not any default values.

Returns:
popupDateFormat

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Description copied from class: HtmlInputText

Gets the state of the instance as a Serializable Object.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class HtmlInputText

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Description copied from class: HtmlInputText

Perform any processing required to restore the state from the entries in the state Object.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class HtmlInputText

saveSeriesState

public java.lang.Object saveSeriesState(javax.faces.context.FacesContext facesContext)
Specified by:
saveSeriesState in interface org.icefaces.impl.component.SeriesStateHolder

restoreSeriesState

public void restoreSeriesState(javax.faces.context.FacesContext facesContext,
                               java.lang.Object state)
Specified by:
restoreSeriesState in interface org.icefaces.impl.component.SeriesStateHolder

getLinkMap

public java.util.Map getLinkMap()
Returns:
linkMap

setLinkMap

public void setLinkMap(java.util.Map linkMap)
Parameters:
linkMap -

getSelectedDayLink

public java.lang.String getSelectedDayLink()
Returns:
selectedDayLink

setSelectedDayLink

public void setSelectedDayLink(java.lang.String selectedDayLink)
Parameters:
selectedDayLink -

getPartialSubmit

public boolean getPartialSubmit()
Description copied from class: HtmlInputText

Return the value of the partialSubmit property.

Specified by:
getPartialSubmit in interface com.icesoft.faces.component.IceExtended
Overrides:
getPartialSubmit in class HtmlInputText

setHighlightClass

public void setHighlightClass(java.lang.String highlightClass)

Set the value of the highlightClass property.

Parameters:
highlightClass -

getHighlightClass

public java.lang.String getHighlightClass()

Return the value of the highlightClass property.

Returns:
String highlightClass, if never set returns a blank string not null

requestFocus

public void requestFocus()
Description copied from class: HtmlInputText
This method is used to communicate a focus request from the application to the client browser.

Overrides:
requestFocus in class HtmlInputText

setHighlightUnit

public void setHighlightUnit(java.lang.String highlightUnit)

Set the value of the highlightUnit property.

Parameters:
highlightUnit - The highlight class

getHighlightUnit

public java.lang.String getHighlightUnit()

Return the value of the highlightUnit property.

Returns:
String highlightUnit, if never set returns a blank string not null

setHighlightValue

public void setHighlightValue(java.lang.String highlightValue)

Set the value of the highlightValue property.

Parameters:
highlightValue -

getHighlightValue

public java.lang.String getHighlightValue()

Return the value of the highlightValue property.

Returns:
String highlightValue. if never set returns blank a string not null

getInputTitle

public java.lang.String getInputTitle()

setInputTitle

public void setInputTitle(java.lang.String inputTitle)

validate

public void validate(javax.faces.context.FacesContext context)
Overrides:
validate in class javax.faces.component.UIInput

ICEfaces ICE Components 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.