com.sun.webui.jsf.component
Class Scheduler

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 com.sun.webui.jsf.component.WebuiInput
                      extended by com.sun.webui.jsf.component.Scheduler
All Implemented Interfaces:
com.sun.webui.jsf.component.ComplexComponent, DateManager, javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class Scheduler
extends WebuiInput
implements com.sun.webui.jsf.component.ComplexComponent, DateManager, javax.faces.component.NamingContainer

The Scheduler component is used to display a calendar and the input controls that are used for selecting a date and time.


Field Summary
static java.lang.String DATE_FACET
          The date facet name.
static java.lang.String DATE_LABEL_FACET
          The date label facet name.
static java.lang.String DATE_PICKER_FACET
          The date picker facet name.
static java.lang.String END_HOUR_TITLE_TEXT_KEY
          The end hour title text key
static java.lang.String END_MINUTE_TITLE_TEXT_KEY
          The end minute title text key
static java.lang.String END_TIME_FACET
          The end time facet name.
static java.lang.String END_TIME_LABEL_FACET
          The end time facet name.
static java.lang.String END_TIME_TEXT_KEY
          The end time label text.
static java.lang.String ICON_ID
           
static java.lang.String PREVIEW_BUTTON_FACET
          The preview button facet name.
static java.lang.String PREVIEW_BUTTON_TEXT_KEY
          The preview button text key.
static java.lang.String REPEAT_INTERVAL_DESCRIPTION_TEXT_KEY
          The repeat interval descriptions text key.
static java.lang.String REPEAT_INTERVAL_FACET
          The repeat interval facet name.
static java.lang.String REPEAT_INTERVAL_LABEL_FACET
          The repeat interval label facet name.
static java.lang.String REPEAT_INTERVAL_TEXT_KEY
          The repeat interval label text.
static java.lang.String REPEAT_LIMIT_FACET
          The repeat limit facet name.
static java.lang.String REPEAT_LIMIT_LABEL_FACET
          The repeat limit label facet name.
static java.lang.String REPEAT_LIMIT_TEXT_KEY
          The repeat limit label text.
static java.lang.String REPEAT_LIMIT_UNIT_FACET
          The repeat unit facet name.
static java.lang.String REPEAT_UNIT_DESCRIPTION_TEXT_KEY
          The repeat unit descriptions text key.
static java.lang.String START_DATE_TEXT_KEY
          The start date label text.
static java.lang.String START_HOUR_TITLE_TEXT_KEY
          The start hour title text key
static java.lang.String START_MINUTE_TITLE_TEXT_KEY
          The start minute title text key
static java.lang.String START_TIME_FACET
          The start time facet name.
static java.lang.String START_TIME_LABEL_FACET
          The start time facet name.
static java.lang.String START_TIME_TEXT_KEY
          The start time label text.
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
Scheduler()
          Default constructor.
 
Method Summary
 void encodeEnd(javax.faces.context.FacesContext context)
           
 java.lang.Object getConvertedValue(javax.faces.context.FacesContext context, java.lang.Object submittedValue)
          Perform the following algorithm to validate the local value of this UIInput.
 javax.faces.convert.Converter getConverter()
           
 javax.faces.component.UIComponent getDateComponent()
          Return a component that implements a date input field.
 java.text.DateFormat getDateFormat()
           
 java.lang.String getDateFormatPattern()
          The date format pattern to use (i.e.
 java.lang.String getDateFormatPatternHelp()
          A message below the text field for the date, indicating the string format to use when entering a date as text into the Start Date text field.
 java.lang.String getDateLabel()
          This text replaces the "Start Date" label.
 javax.faces.component.UIComponent getDateLabelComponent(Theme theme)
          Return a component that implements a label for the date component.
 com.sun.webui.jsf.component.CalendarMonth getDatePicker()
          Return a CalendarMonth component that implements the calendar for the Scheduler.
 Time getEndTimeComponent()
          Return a Time component that implements the end time.
 java.lang.String getEndTimeLabel()
          This text replaces the "End Time" label.
 javax.faces.component.UIComponent getEndTimeLabelComponent(Theme theme)
          Return a component that implements a label for end time component.
 java.lang.String getFamily()
          Return the family for this component.
 java.util.Date getFirstAvailableDate()
           
 java.lang.String getFocusElementId(javax.faces.context.FacesContext context)
          Returns the id of an HTML element suitable to receive the focus.
 javax.faces.component.UIComponent getIndicatorComponent(javax.faces.context.FacesContext context, Label label)
          Return a component instance that can be referenced by a Label in order to evaluate the required and valid states of this component.
 java.lang.String getJavaScriptObjectName(javax.faces.context.FacesContext context)
           
 java.lang.String getLabeledElementId(javax.faces.context.FacesContext context)
          Returns the absolute ID of an HTML element suitable for use as the value of an HTML LABEL element's for attribute.
 java.util.Date getLastAvailableDate()
           
 java.util.Date getMaxDate()
          A java.util.Date object representing the last selectable day.
 java.util.Date getMinDate()
          A java.util.Date object representing the first selectable day.
 javax.faces.component.UIComponent getPreviewButtonComponent()
          Return a component that implements a preview button facet.
 java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
          Deprecated.  
 javax.faces.component.UIComponent getRepeatingFieldComponent()
          Return a component that implements a repeating limit input field.
 DropDown getRepeatIntervalComponent()
          Return a DropDown component that implements a repeat interval menu.
 java.lang.Object getRepeatIntervalItems()
          If the developer has not provided repeat interval items, return an Options array of RepeatIntervalOption elements representing the following intervals.
 java.lang.String getRepeatIntervalLabel()
          Override the default value of the label for the repeat interval menu.
 javax.faces.component.UIComponent getRepeatIntervalLabelComponent()
          Return a component that implements a label for repeat interval component.
 java.lang.String getRepeatLimitLabel()
          Override the default value of the label for the repeat limit menu.
 javax.faces.component.UIComponent getRepeatLimitLabelComponent()
          Return a component that implements a label for the repeat limit component.
 DropDown getRepeatUnitComponent()
          Return a DropDown component that implements a repeat unit menu.
 java.lang.Object getRepeatUnitItems()
          If the developer has not provided repeat unit items, return an Options array of RepeatUnitOption elements representing the following units.
 Time getStartTimeComponent()
          Return a Time component that implements the start time.
 java.lang.String getStartTimeLabel()
          This text replaces the "Start Time" label.
 javax.faces.component.UIComponent getStartTimeLabelComponent(Theme theme)
          Return a component that implements a label for the start time component.
 java.lang.String getStyle()
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 int getTabIndex()
          Position of this element in the tabbing order of the current document.
 java.util.TimeZone getTimeZone()
          The java.util.TimeZone used with this component.
 boolean isDisabled()
          Standard HTML attribute which determines whether the web application user can change the the value of this component.
 boolean isEndTime()
          Flag indicating that an input field for the end time should be shown.
 boolean isLimitRepeating()
          Flag indicating that a control for setting a limit for repeating events should be shown.
 boolean isPreviewButton()
          Flag indicating that the "Preview in Browser" button should be displayed - default value is true.
 boolean isReadOnly()
          If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined.
 boolean isRepeating()
          Flag indicating that a control for scheduling a repeated event should be shown.
 boolean isRequired()
          Flag indicating that the user must enter a value for this Scheduler.
 boolean isRequiredLegend()
          Flag indicating if the "* indicates required field" message should be displayed - default value is true.
 boolean isStartTime()
          Flag indicating that an input field for the start time should be shown.
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void processDecodes(javax.faces.context.FacesContext context)
          Specialized decode behavior on top of that provided by the superclass.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setDateFormatPattern(java.lang.String dateFormatPattern)
          The date format pattern to use (i.e.
 void setDateFormatPatternHelp(java.lang.String dateFormatPatternHelp)
          A message below the text field for the date, indicating the string format to use when entering a date as text into the Start Date text field.
 void setDateLabel(java.lang.String dateLabel)
          This text replaces the "Start Date" label.
 void setDisabled(boolean disabled)
          Standard HTML attribute which determines whether the web application user can change the the value of this component.
 void setEndTime(boolean endTime)
          Flag indicating that an input field for the end time should be shown.
 void setEndTimeLabel(java.lang.String endTimeLabel)
          This text replaces the "End Time" label.
 void setLimitRepeating(boolean limitRepeating)
          Flag indicating that a control for setting a limit for repeating events should be shown.
 void setMaxDate(java.util.Date maxDate)
          A java.util.Date object representing the last selectable day.
 void setMinDate(java.util.Date minDate)
          A java.util.Date object representing the first selectable day.
 void setPreviewButton(boolean previewButton)
          Flag indicating that the "Preview in Browser" button should be displayed - default value is true.
 void setReadOnly(boolean readOnly)
          If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined.
 void setRepeating(boolean repeating)
          Flag indicating that a control for scheduling a repeated event should be shown.
 void setRepeatIntervalItems(java.lang.Object repeatIntervalItems)
          Override the items that appear on the repeat interval menu.
 void setRepeatIntervalLabel(java.lang.String repeatIntervalLabel)
          Override the default value of the label for the repeat interval menu.
 void setRepeatLimitLabel(java.lang.String repeatLimitLabel)
          Override the default value of the label for the repeat limit menu.
 void setRepeatUnitItems(java.lang.Object repeatUnitItems)
          Override the items that appear on the repeat limit unit menu.
 void setRequired(boolean required)
          Flag indicating that the user must enter a value for this Scheduler.
 void setRequiredLegend(boolean requiredLegend)
          Flag indicating if the "* indicates required field" message should be displayed - default value is true.
 void setStartTime(boolean startTime)
          Flag indicating that an input field for the start time should be shown.
 void setStartTimeLabel(java.lang.String startTimeLabel)
          This text replaces the "Start Time" label.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setTabIndex(int tabIndex)
          Position of this element in the tabbing order of the current document.
 void setTimeZone(java.util.TimeZone timeZone)
          The java.util.TimeZone used with this component.
 void setValue(java.lang.Object value)
          The current value of this component.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void updateRepeatUnitMenu()
          Called from IntervalListener, enable or disable dependent facets.
 
Methods inherited from class com.sun.webui.jsf.component.WebuiInput
broadcast, getValidator, getValidatorExpression, getValueChangeListener, getValueChangeListenerExpression, processUpdates, processValidators, setConverter, setId, setImmediate, setRendered, setValidatorExpression, setValueChangeListenerExpression
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidatorMessage, getValidators, getValueChangeListeners, isImmediate, isLocalValueSet, isValid, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setLocalValueSet, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValueChangeListener, updateModel, validate
 
Methods inherited from class javax.faces.component.UIOutput
getLocalValue, getValue
 
Methods inherited from class javax.faces.component.UIComponentBase
encodeBegin, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getLocalValue, getValue
 

Field Detail

DATE_PICKER_FACET

public static final java.lang.String DATE_PICKER_FACET
The date picker facet name.

See Also:
Constant Field Values

DATE_FACET

public static final java.lang.String DATE_FACET
The date facet name.

See Also:
Constant Field Values

DATE_LABEL_FACET

public static final java.lang.String DATE_LABEL_FACET
The date label facet name.

See Also:
Constant Field Values

START_DATE_TEXT_KEY

public static final java.lang.String START_DATE_TEXT_KEY
The start date label text.

See Also:
Constant Field Values

START_TIME_FACET

public static final java.lang.String START_TIME_FACET
The start time facet name.

See Also:
Constant Field Values

START_TIME_LABEL_FACET

public static final java.lang.String START_TIME_LABEL_FACET
The start time facet name.

See Also:
Constant Field Values

START_TIME_TEXT_KEY

public static final java.lang.String START_TIME_TEXT_KEY
The start time label text.

See Also:
Constant Field Values

END_TIME_FACET

public static final java.lang.String END_TIME_FACET
The end time facet name.

See Also:
Constant Field Values

END_TIME_LABEL_FACET

public static final java.lang.String END_TIME_LABEL_FACET
The end time facet name.

See Also:
Constant Field Values

END_TIME_TEXT_KEY

public static final java.lang.String END_TIME_TEXT_KEY
The end time label text.

See Also:
Constant Field Values

REPEAT_LIMIT_UNIT_FACET

public static final java.lang.String REPEAT_LIMIT_UNIT_FACET
The repeat unit facet name.

See Also:
Constant Field Values

REPEAT_UNIT_DESCRIPTION_TEXT_KEY

public static final java.lang.String REPEAT_UNIT_DESCRIPTION_TEXT_KEY
The repeat unit descriptions text key.

See Also:
Constant Field Values

REPEAT_LIMIT_FACET

public static final java.lang.String REPEAT_LIMIT_FACET
The repeat limit facet name.

See Also:
Constant Field Values

REPEAT_LIMIT_LABEL_FACET

public static final java.lang.String REPEAT_LIMIT_LABEL_FACET
The repeat limit label facet name.

See Also:
Constant Field Values

REPEAT_LIMIT_TEXT_KEY

public static final java.lang.String REPEAT_LIMIT_TEXT_KEY
The repeat limit label text.

See Also:
Constant Field Values

REPEAT_INTERVAL_FACET

public static final java.lang.String REPEAT_INTERVAL_FACET
The repeat interval facet name.

See Also:
Constant Field Values

REPEAT_INTERVAL_LABEL_FACET

public static final java.lang.String REPEAT_INTERVAL_LABEL_FACET
The repeat interval label facet name.

See Also:
Constant Field Values

REPEAT_INTERVAL_TEXT_KEY

public static final java.lang.String REPEAT_INTERVAL_TEXT_KEY
The repeat interval label text.

See Also:
Constant Field Values

REPEAT_INTERVAL_DESCRIPTION_TEXT_KEY

public static final java.lang.String REPEAT_INTERVAL_DESCRIPTION_TEXT_KEY
The repeat interval descriptions text key.

See Also:
Constant Field Values

PREVIEW_BUTTON_FACET

public static final java.lang.String PREVIEW_BUTTON_FACET
The preview button facet name.

See Also:
Constant Field Values

PREVIEW_BUTTON_TEXT_KEY

public static final java.lang.String PREVIEW_BUTTON_TEXT_KEY
The preview button text key.

See Also:
Constant Field Values

START_HOUR_TITLE_TEXT_KEY

public static final java.lang.String START_HOUR_TITLE_TEXT_KEY
The start hour title text key

See Also:
Constant Field Values

START_MINUTE_TITLE_TEXT_KEY

public static final java.lang.String START_MINUTE_TITLE_TEXT_KEY
The start minute title text key

See Also:
Constant Field Values

END_HOUR_TITLE_TEXT_KEY

public static final java.lang.String END_HOUR_TITLE_TEXT_KEY
The end hour title text key

See Also:
Constant Field Values

END_MINUTE_TITLE_TEXT_KEY

public static final java.lang.String END_MINUTE_TITLE_TEXT_KEY
The end minute title text key

See Also:
Constant Field Values

ICON_ID

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

Scheduler

public Scheduler()
Default constructor.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class javax.faces.component.UIInput

getDatePicker

public com.sun.webui.jsf.component.CalendarMonth getDatePicker()
Return a CalendarMonth component that implements the calendar for the Scheduler.

This is a private facet.

Returns:
a CalendarMonth component.

getDateLabelComponent

public javax.faces.component.UIComponent getDateLabelComponent(Theme theme)
Return a component that implements a label for the date component. If a facet named dateLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_dateLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
a date label facet component

getDateComponent

public javax.faces.component.UIComponent getDateComponent()
Return a component that implements a date input field. If a facet named date is found that component is returned. Otherwise a TextField component is returned. It is assigned the id
getId() + "_date"

If the facet is not defined then the returned TextField component is re-intialized every time this method is called.

Returns:
a date input field facet component

getStartTimeLabelComponent

public javax.faces.component.UIComponent getStartTimeLabelComponent(Theme theme)
Return a component that implements a label for the start time component. If a facet named startTimeLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_startTimeLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
a start time label facet component

getStartTimeComponent

public Time getStartTimeComponent()
Return a Time component that implements the start time. If ComponentUtilities.getPrivateFacet() returns a facet named startTime that component is initialized every time this method is called and returned.

This is a private facet.

Otherwise a Time component is created and initialized. It is assigned the id
getId() + "_startTime" and added to the facets map as a private facet.

Returns:
a start time Time component.

getEndTimeLabelComponent

public javax.faces.component.UIComponent getEndTimeLabelComponent(Theme theme)
Return a component that implements a label for end time component. If a facet named endTimeLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_endTimeLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
a end time label facet component

getEndTimeComponent

public Time getEndTimeComponent()
Return a Time component that implements the end time. If ComponentUtilities.getPrivateFacet() returns a facet named endTime that component is initialized every time this method is called and returned.

This is a private facet.

Otherwise a Time component is created and initialized. It is assigned the id
getId() + "_endTime" and added to the facets map as a private facet.

Returns:
an end time Time component.

getRepeatIntervalLabelComponent

public javax.faces.component.UIComponent getRepeatIntervalLabelComponent()
Return a component that implements a label for repeat interval component. If a facet named repeatIntervalLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_repeatIntervalLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
a repeat interval label facet component

getRepeatIntervalComponent

public DropDown getRepeatIntervalComponent()
Return a DropDown component that implements a repeat interval menu. If ComponentUtilities.getPrivateFacet() returns a facet named repeatInterval that component is initialized every time this method is called and returned.

This is a private facet.

Otherwise a DropDown component is created and initialized. It is assigned the id
getId() + "_repeatInterval" and added to the facets map as a private facet.

Returns:
a repeat interval DropDown component.

getRepeatLimitLabelComponent

public javax.faces.component.UIComponent getRepeatLimitLabelComponent()
Return a component that implements a label for the repeat limit component. If a facet named repeatLimitLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_repeatLimitLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
a repeat limit label facet component

getRepeatingFieldComponent

public javax.faces.component.UIComponent getRepeatingFieldComponent()
Return a component that implements a repeating limit input field. If a facet named repeatLimit is found that component is returned. Otherwise a TextField component is returned. It is assigned the id
getId() + "_repeatLimit"

If the facet is not defined then the returned TextField component is re-intialized every time this method is called.

Returns:
a repeat limit input field facet component

getRepeatUnitComponent

public DropDown getRepeatUnitComponent()
Return a DropDown component that implements a repeat unit menu. If ComponentUtilities.getPrivateFacet() returns a facet named repeatLimitUnit that component is initialized every time this method is called and returned.

This is a private facet.

Otherwise a DropDown component is created and initialized. It is assigned the id
getId() + "_repeatLimitUnit" and added to the facets map as a private facet.

Returns:
a repeat unit DropDown component.

getPreviewButtonComponent

public javax.faces.component.UIComponent getPreviewButtonComponent()
Return a component that implements a preview button facet. If a facet named previewButton is found that component is returned. Otherwise a Button component is returned. It is assigned the id
getId() + "_previewButton"

If the facet is not defined then the returned Button component is re-intialized every time this method is called.

Returns:
a preview button facet component

updateRepeatUnitMenu

public void updateRepeatUnitMenu()
Called from IntervalListener, enable or disable dependent facets. If the REPEAT_INTERVAL_FACET exists, has a non null value that is an instance of RepeatInterval and is RepeatInterval.ONETIME then disable the REPEAT_LIMIT_FACET and REPEAT_INTERVAL_FACET facets. This includes setting the values of the facets to null.
Otherwise enable both facets.
If the value is null or not an instance of RepeatInterval then disable the REPEAT_LIMIT_FACET and REPEAT_INTERVAL_FACET facets as described above.


getPrimaryElementID

public java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
Deprecated. 

Implement this method so that it returns the DOM ID of the HTML element which should receive focus when the component receives focus, and to which a component label should apply. Usually, this is the first element that accepts input.

Specified by:
getPrimaryElementID in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext for the request
Returns:
The client id, also the JavaScript element id
See Also:
getLabeledElementId(javax.faces.context.FacesContext), getFocusElementId(javax.faces.context.FacesContext)

getLabeledElementId

public java.lang.String getLabeledElementId(javax.faces.context.FacesContext context)
Returns the absolute ID of an HTML element suitable for use as the value of an HTML LABEL element's for attribute. If the ComplexComponent has sub-compoents, and one of the sub-components is the target of a label, if that sub-component is a ComplexComponent, then getLabeledElementId must called on the sub-component and the value returned. The value returned by this method call may or may not resolve to a component instance.

This implementation returns the id of the component returned by getDateComponent. If that method returns null null is returned.

Specified by:
getLabeledElementId in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext used for the request
Returns:
An abolute id suitable for the value of an HTML LABEL element's for attribute.

getFocusElementId

public java.lang.String getFocusElementId(javax.faces.context.FacesContext context)
Returns the id of an HTML element suitable to receive the focus. If the ComplexComponent has sub-compoents, and one of the sub-components is to reveive the focus, if that sub-component is a ComplexComponent, then getFocusElementId must called on the sub-component and the value returned. The value returned by this method call may or may not resolve to a component instance.

This implementation returns the value of getLabeledElementId.

Specified by:
getFocusElementId in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext used for the request

getIndicatorComponent

public javax.faces.component.UIComponent getIndicatorComponent(javax.faces.context.FacesContext context,
                                                               Label label)
Return a component instance that can be referenced by a Label in order to evaluate the required and valid states of this component.

Specified by:
getIndicatorComponent in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The current FacesContext instance
label - The Label that labels this component.
Returns:
a UIComponent in order to evaluate the required and valid states.

getRepeatIntervalItems

public java.lang.Object getRepeatIntervalItems()
If the developer has not provided repeat interval items, return an Options array of RepeatIntervalOption elements representing the following intervals.


getRepeatUnitItems

public java.lang.Object getRepeatUnitItems()
If the developer has not provided repeat unit items, return an Options array of RepeatUnitOption elements representing the following units.


getDateFormat

public java.text.DateFormat getDateFormat()
Specified by:
getDateFormat in interface DateManager

getJavaScriptObjectName

public java.lang.String getJavaScriptObjectName(javax.faces.context.FacesContext context)

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)

Specialized decode behavior on top of that provided by the superclass. In addition to the standard processDecodes behavior inherited from UIComponentBase, calls validate() if the the immediate property is true; if the component is invalid afterwards or a RuntimeException is thrown, calls FacesContext.renderResponse().

Overrides:
processDecodes in class WebuiInput
Parameters:
context - FacesContext for this request.
Throws:
java.lang.NullPointerException

getConvertedValue

public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
                                          java.lang.Object submittedValue)
                                   throws javax.faces.convert.ConverterException

Perform the following algorithm to validate the local value of this UIInput.

Application components implementing UIInput that wish to perform validation with logic embedded in the component should perform their own correctness checks, and then call the super.validate() method to perform the standard processing described above.

Overrides:
getConvertedValue in class javax.faces.component.UIInput
Parameters:
context - The FacesContext for the current request
Throws:
javax.faces.convert.ConverterException

encodeEnd

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

getFirstAvailableDate

public java.util.Date getFirstAvailableDate()
Specified by:
getFirstAvailableDate in interface DateManager

getLastAvailableDate

public java.util.Date getLastAvailableDate()
Specified by:
getLastAvailableDate in interface DateManager

setValue

public void setValue(java.lang.Object value)
The current value of this component.

Specified by:
setValue in interface javax.faces.component.ValueHolder
Overrides:
setValue in class javax.faces.component.UIInput

getConverter

public javax.faces.convert.Converter getConverter()
Specified by:
getConverter in interface javax.faces.component.ValueHolder
Overrides:
getConverter in class javax.faces.component.UIOutput

getDateFormatPattern

public java.lang.String getDateFormatPattern()

The date format pattern to use (i.e. yyyy-MM-dd). The component uses an instance of java.text.SimpleDateFormat and you may specify a pattern to be used by this component, with the following restriction: the format pattern must include yyyy (not yy), MM, and dd; and no other parts of time may be displayed. If a pattern is not specified, a locale-specific default is used.

If you change the date format pattern, you may also need to change the dateFormatPatternHelp attribute. See the documentation for that attribute.

Specified by:
getDateFormatPattern in interface DateManager

setDateFormatPattern

public void setDateFormatPattern(java.lang.String dateFormatPattern)

The date format pattern to use (i.e. yyyy-MM-dd). The component uses an instance of java.text.SimpleDateFormat and you may specify a pattern to be used by this component, with the following restriction: the format pattern must include yyyy (not yy), MM, and dd; and no other parts of time may be displayed. If a pattern is not specified, a locale-specific default is used.

If you change the date format pattern, you may also need to change the dateFormatPatternHelp attribute. See the documentation for that attribute.

See Also:
getDateFormatPattern()

getDateFormatPatternHelp

public java.lang.String getDateFormatPatternHelp()

A message below the text field for the date, indicating the string format to use when entering a date as text into the Start Date text field.

The component internally relies on an instance of java.text.SimpleDateFormat to produce the hint. The default hint is constructed by invoking the toLocalizedPattern() method on the SimpleDateFormat instance and converting this String to lower case.

Due to a bug in SimpleDateFormat, toLocalizedPattern() does not actually produce locale-appropriate strings for most locales (it works for German, but not for other locales). If the default value for the dateFormtPattern is used, the component takes care of the localization itself, but if the default is overridden, you may need to override the hint on a per-locale basis too.


setDateFormatPatternHelp

public void setDateFormatPatternHelp(java.lang.String dateFormatPatternHelp)

A message below the text field for the date, indicating the string format to use when entering a date as text into the Start Date text field.

The component internally relies on an instance of java.text.SimpleDateFormat to produce the hint. The default hint is constructed by invoking the toLocalizedPattern() method on the SimpleDateFormat instance and converting this String to lower case.

Due to a bug in SimpleDateFormat, toLocalizedPattern() does not actually produce locale-appropriate strings for most locales (it works for German, but not for other locales). If the default value for the dateFormtPattern is used, the component takes care of the localization itself, but if the default is overridden, you may need to override the hint on a per-locale basis too.

See Also:
getDateFormatPatternHelp()

getDateLabel

public java.lang.String getDateLabel()

This text replaces the "Start Date" label.


setDateLabel

public void setDateLabel(java.lang.String dateLabel)

This text replaces the "Start Date" label.

See Also:
getDateLabel()

isDisabled

public boolean isDisabled()

Standard HTML attribute which determines whether the web application user can change the the value of this component. NOT YET IMPLEMENTED.


setDisabled

public void setDisabled(boolean disabled)

Standard HTML attribute which determines whether the web application user can change the the value of this component. NOT YET IMPLEMENTED.

See Also:
isDisabled()

isEndTime

public boolean isEndTime()

Flag indicating that an input field for the end time should be shown. The default value is true.


setEndTime

public void setEndTime(boolean endTime)

Flag indicating that an input field for the end time should be shown. The default value is true.

See Also:
isEndTime()

getEndTimeLabel

public java.lang.String getEndTimeLabel()

This text replaces the "End Time" label.


setEndTimeLabel

public void setEndTimeLabel(java.lang.String endTimeLabel)

This text replaces the "End Time" label.

See Also:
getEndTimeLabel()

isLimitRepeating

public boolean isLimitRepeating()

Flag indicating that a control for setting a limit for repeating events should be shown. The default value is true.


setLimitRepeating

public void setLimitRepeating(boolean limitRepeating)

Flag indicating that a control for setting a limit for repeating events should be shown. The default value is true.

See Also:
isLimitRepeating()

getMaxDate

public java.util.Date getMaxDate()

A java.util.Date object representing the last selectable day. The default value is four years after the minDate (which is evaluated first).

The value of this attribute is reflected in the years that are available for selection in the month display. In future releases of this component, web application users will also not be able to view months after this date, or select days that follow this date. At present such dates can be selected, but will not be validated when the form is submitted.


setMaxDate

public void setMaxDate(java.util.Date maxDate)

A java.util.Date object representing the last selectable day. The default value is four years after the minDate (which is evaluated first).

The value of this attribute is reflected in the years that are available for selection in the month display. In future releases of this component, web application users will also not be able to view months after this date, or select days that follow this date. At present such dates can be selected, but will not be validated when the form is submitted.

See Also:
getMaxDate()

getMinDate

public java.util.Date getMinDate()

A java.util.Date object representing the first selectable day. The default value is today's date.

The value of this attribute is reflected in the years that are available for selection in the month display. In future releases of this component, web application users will also not be able to view months before this date, or select days that precede this date. At present such dates can be selected, but will not be validated when the form is submitted.


setMinDate

public void setMinDate(java.util.Date minDate)

A java.util.Date object representing the first selectable day. The default value is today's date.

The value of this attribute is reflected in the years that are available for selection in the month display. In future releases of this component, web application users will also not be able to view months before this date, or select days that precede this date. At present such dates can be selected, but will not be validated when the form is submitted.

See Also:
getMinDate()

isPreviewButton

public boolean isPreviewButton()

Flag indicating that the "Preview in Browser" button should be displayed - default value is true.


setPreviewButton

public void setPreviewButton(boolean previewButton)

Flag indicating that the "Preview in Browser" button should be displayed - default value is true.

See Also:
isPreviewButton()

isReadOnly

public boolean isReadOnly()

If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined. NOT YET IMPLEMENTED.


setReadOnly

public void setReadOnly(boolean readOnly)

If this attribute is set to true, the value of the component is rendered as text, preceded by the label if one was defined. NOT YET IMPLEMENTED.

See Also:
isReadOnly()

setRepeatIntervalItems

public void setRepeatIntervalItems(java.lang.Object repeatIntervalItems)

Override the items that appear on the repeat interval menu. The value must be one of an array, Map or Collection whose members are all subclasses of com.sun.webui.jsf.model.scheduler.RepeatIntervalOption, whose values must be one of the member classes of com.sun.webui.jsf.model.scheduler.RepeatInterval, for example com.sun.webui.jsf.model.scheduler.RepeatInterval.ONETIME or com.sun.webui.jsf.model.scheduler.RepeatInterval.HOURLY. If this attribute is not specified, default options of "One Time", "Hourly", "Weekly", "Monthtly" will be shown.

See Also:
getRepeatIntervalItems()

getRepeatIntervalLabel

public java.lang.String getRepeatIntervalLabel()

Override the default value of the label for the repeat interval menu.


setRepeatIntervalLabel

public void setRepeatIntervalLabel(java.lang.String repeatIntervalLabel)

Override the default value of the label for the repeat interval menu.

See Also:
getRepeatIntervalLabel()

getRepeatLimitLabel

public java.lang.String getRepeatLimitLabel()

Override the default value of the label for the repeat limit menu.


setRepeatLimitLabel

public void setRepeatLimitLabel(java.lang.String repeatLimitLabel)

Override the default value of the label for the repeat limit menu.

See Also:
getRepeatLimitLabel()

setRepeatUnitItems

public void setRepeatUnitItems(java.lang.Object repeatUnitItems)

Override the items that appear on the repeat limit unit menu. The value must be one of an array, Map or Collection whose members are all subclasses of com.sun.webui.jsf.model.Option, and the value of the options must implement the com.sun.webui.jsf.model.RepeatUnit interface. The default value is to show a menu with values "Hours", "Days", "Weeks", "Months".

See Also:
getRepeatUnitItems()

isRepeating

public boolean isRepeating()

Flag indicating that a control for scheduling a repeated event should be shown. The default value is true.


setRepeating

public void setRepeating(boolean repeating)

Flag indicating that a control for scheduling a repeated event should be shown. The default value is true.

See Also:
isRepeating()

isRequired

public boolean isRequired()

Flag indicating that the user must enter a value for this Scheduler. Default value is true.

Specified by:
isRequired in interface javax.faces.component.EditableValueHolder
Overrides:
isRequired in class javax.faces.component.UIInput

setRequired

public void setRequired(boolean required)

Flag indicating that the user must enter a value for this Scheduler. Default value is true.

Specified by:
setRequired in interface javax.faces.component.EditableValueHolder
Overrides:
setRequired in class WebuiInput
See Also:
isRequired()

isRequiredLegend

public boolean isRequiredLegend()

Flag indicating if the "* indicates required field" message should be displayed - default value is true.


setRequiredLegend

public void setRequiredLegend(boolean requiredLegend)

Flag indicating if the "* indicates required field" message should be displayed - default value is true.

See Also:
isRequiredLegend()

isStartTime

public boolean isStartTime()

Flag indicating that an input field for the start time should be shown. The default value is true.


setStartTime

public void setStartTime(boolean startTime)

Flag indicating that an input field for the start time should be shown. The default value is true.

See Also:
isStartTime()

getStartTimeLabel

public java.lang.String getStartTimeLabel()

This text replaces the "Start Time" label.


setStartTimeLabel

public void setStartTimeLabel(java.lang.String startTimeLabel)

This text replaces the "Start Time" label.

See Also:
getStartTimeLabel()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied to the outermost HTML element when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()

getTabIndex

public int getTabIndex()

Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.


setTabIndex

public void setTabIndex(int tabIndex)

Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.

See Also:
getTabIndex()

getTimeZone

public java.util.TimeZone getTimeZone()

The java.util.TimeZone used with this component. Unless set, the default TimeZone for the locale in javax.faces.component.UIViewRoot is used.

Specified by:
getTimeZone in interface DateManager

setTimeZone

public void setTimeZone(java.util.TimeZone timeZone)

The java.util.TimeZone used with this component. Unless set, the default TimeZone for the locale in javax.faces.component.UIViewRoot is used.

See Also:
getTimeZone()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

See Also:
isVisible()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

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

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.

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


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.