| |||||||
FRAMES NO FRAMES |
Use the webuijsf:scheduler
tag to display a calendar and
the input controls that are used for selecting a date and time. The
webuijsf:scheduler
tag's attributes allow you to associate the
component with a value (a com.sun.webui.jsf.model.ScheduledEvent
),
and to configure how the input controls are rendered.
The Scheduler component displays a monthly calendar, consisting of
a <table>
element with cells that contain hyperlinks
for each day of the month. When a date link is clicked, the associated
date is displayed in the Start Date field. The current month is displayed
initially by default, and the user can select a different month by
using a drop-down menu. Hyperlinked icons to the left and right of the
Month menu can be used to go to the previous and next months. Another
drop-down menu can be used to select a different year.
The Start Time is always rendered by the component, and consists of separate drop-down menus for the hour and minute. The user is required to enter values for Start Date and Start Time, so those subcomponents of the Scheduler are annotated as required by default.
Additional input controls
for End Time, Repeat Interval, and Repeat Limit are rendered by default
to allow detailed scheduling control by the
user. These input controls can be removed by setting webuijsf:scheduler
tag attributes. The Scheduler component also renders a button to allow users to
preview their scheduled events in the calendar, where days with
scheduled events appear as highlighted cells in the table.
The following diagram shows the layout of the Scheduler component. The diagram represents the default calendar, which includes all available input controls.
* Indicates
required field
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
webuijsf:scheduler
TagUse the value
attribute to associate the component with
a model object that represents the current value. The model object
must be of type com.sun.webui.jsf.model.ScheduledEvent
.
Schedule data entered by the user is automatically converted to and
from the ScheduledEvent
.
You can use webuijsf:scheduler
tag attributes to configure the
appearance of the Scheduler. By
default, input elements for Start Date, Start Time, End Time,
Repeat Interval, and Repeat Limit are shown. You can specify your own labels for
the input elements. You can also suppress the display of most of the elements.
All but the Start Date are optional. To suppress the End Time element, set
endTime
repeating to false;
to suppress just the Repeat Limit controls, set
limitRepeating
to false.
You can also prevent display of the Preview in Calendar button by setting
previewButton
to false.
To configure a range of dates that can be selected, specify the
minDate
and maxDate
attributes.
The range of years available in the Calendar display is
derived from the the minDate
and maxDate
attributes.
None.
This example uses all the input elements, but changes the labels for the dates and times.
<webuijsf:scheduler id="scheduler" dateLabel="Date: " startTimeLabel="Start: " endTimeLabel="End: " value="#{SchedulerBean.event}"/>
This example disables the End Time, Repeat Interval, and Repeat Limit controls.
<webuijsf:scheduler id="scheduler" dateLabel="Date: " startTimeLabel="Start: " repeating="false" endTime="false" value="#{SchedulerBean.event}"/>
import com.sun.webui.jsf.model.ScheduledEvent;
public class SchedulerBean {
// Creates a new instance of SchedulerBean
public SchedulerBean() {
}
//
// Holds value of property event.
//
private ScheduledEvent event = null;
//
// Getter for property event.
// @return Value of property event.
//
public ScheduledEvent getEvent() {
return this.event;
}
//
// Setter for property event.
// @param event New value of property
event.
//
public void setEvent(ScheduledEvent
event) {
this.event = event;
}
...
}
Tag Information | |
Tag Class | com.sun.webui.jsf.component.SchedulerTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
binding | false | false | java.lang.String | A ValueExpression that resolves to the UIComponent that corresponds to this tag. This attribute allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children. |
repeatIntervalLabel | false | false | java.lang.String | Override the default value of the label for the repeat interval menu. |
repeatIntervalItems | false | false | java.lang.String | 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
|
requiredLegend | false | false | java.lang.String | Flag indicating if the "* indicates required field" message should be displayed - default value is true. |
dateFormatPatternHelp | false | false | java.lang.String | 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
Due to a bug in
|
minDate | false | false | java.lang.String | A 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. |
endTime | false | false | java.lang.String | Flag indicating that an input field for the end time should be shown. The default value is true. |
dateFormatPattern | false | false | java.lang.String | The date format pattern to use (i.e. yyyy-MM-dd). The
component uses an instance of
If you change the date format pattern, you may also need to
change the |
startTimeLabel | false | false | java.lang.String | This text replaces the "Start Time" label. |
maxDate | false | false | java.lang.String | A 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. |
styleClass | false | false | java.lang.String | CSS style class(es) to be applied to the outermost HTML element when this component is rendered. |
style | false | false | java.lang.String | CSS style(s) to be applied to the outermost HTML element when this component is rendered. |
startTime | false | false | java.lang.String | Flag indicating that an input field for the start time should be shown. The default value is true. |
repeating | false | false | java.lang.String | Flag indicating that a control for scheduling a repeated event should be shown. The default value is true. |
timeZone | false | false | java.lang.String | The |
value | false | false | java.lang.String | The current value of this component. |
endTimeLabel | false | false | java.lang.String | This text replaces the "End Time" label. |
limitRepeating | false | false | java.lang.String | Flag indicating that a control for setting a limit for repeating events should be shown. The default value is true. |
previewButton | false | false | java.lang.String | Flag indicating that the "Preview in Browser" button should be displayed - default value is true. |
repeatLimitLabel | false | false | java.lang.String | Override the default value of the label for the repeat limit menu. |
repeatUnitItems | false | false | java.lang.String | 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
|
visible | false | false | java.lang.String | 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. |
readOnly | false | false | java.lang.String | 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. |
dateLabel | false | false | java.lang.String | This text replaces the "Start Date" label. |
tabIndex | false | false | java.lang.String | 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. |
immediate | false | false | java.lang.String | Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase. |
validatorExpression | false | false | java.lang.String | Used to specify a method in a backing bean to validate input
to the component. The value must be a JavaServer Faces
EL expression that resolves to a public method with
return type void. The method must take three parameters:
The backing bean where the method is defined must implement
The method is invoked during the Process Validations Phase. |
rendered | false | false | java.lang.String | Indicates whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission. |
valueChangeListenerExpression | false | false | java.lang.String | Specifies a method to handle a value-change event that is triggered
when the user enters data in the input component. The
attribute value must be a JavaServer Faces EL expression that
resolves to a backing bean method. The method must take a single
parameter of type javax.faces.event.ValueChangeEvent ,
and its return type must be void. The backing bean where the
method is defined must implement java.io.Serializable
or javax.faces.component.StateHolder .
|
id | false | true | java.lang.String | No Description |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |