A control that uses a table to display cells as days in a calendar layout. Use the Calendar control to display a list of calendar events in a calendar table.
The calendar format uses the displayUnits
property to set the arrangement of days as a full calendar month, a single week, or a single day. Setting the rows
property specifies the number of displayed calendar units at one time. For example, specifying displayUnits
to units of days, and setting the rows
property to 3, displays a three-day horizontal span of days. If a paging control is attached to the calendar, it moves forward or back three days at a time.
The Calendar control displays days, weeks, and months based on a range of items that use a zero-based index. To use a zero-based index, you must define the calendar's calendarStartDate
property.
When a calendarStartDate
is not specified, the default value is calculated using the current displayUnits
. For example, if the displayUnits
property is set to week, the default start date is set to the week prior to the current week. The user cannot page back to before the calendar's calendarStartDate
.
The calendarEndDate
property specifies the last date the user can view in the calendar. An undefined calendarEndDate
indicates an open-ended range.
The events displayed in the Calendar control are provided by binding the events
property to an ICalendarEventProvider
, which exposes a list of objects that implement the ICalendarEvent
interface. You can use an actual ICalendarEventProvider
, which is a list containing ICalendarEvent
objects, or an array of ICalendarEvents
.
The Calendar control separates events into two categories:
The Calendar control renders Multi-day events horizontally and occupy a single row in the calendar.
The Calendar control renders Sub-day events as items stacked vertically in a day's cell.
The calendar contents display in the header
and event
facets. The header
facet is a set of controls that draws the calendar header and can contain a set of text controls that display the range of dates displayed. The event
facet contains a set of controls that draw each event in the calendar. Using the event
facet, you to specify how to render the event drawn.
The facet controls can bind to any expression. However, the calendar exposes three scope variables that represent the current item being drawn. The properties exposed by these variables are visible in the Bindings View:
CalendarUnit
object exposing information about the currently displayed unit (month, week, day). This variable is useful when drawing the calendar header.ICalendarDay
object exposing information about the current day being drawn. The variable contains a single Date.ICalendarEvent
object currently in rendering process. Although any object can use the ICalendarEvent
object, the interface exposes the event Start/Stop date, event type, header, and body for use in the event
facet controls.Info | Value |
---|---|
Component Type | com.webmethods.caf.faces.table.Calendar |
Handler Class | com.webmethods.caf.faces.component.DynamicControlHandler |
Renderer Type | com.webmethods.caf.faces.table.Calendar |
Description | Displays a list of calendar events in a calendar table |
Palette Location | CAF Html/Control/Table/Calendar |
Name | Description |
---|---|
header | Table header |
event | Control to render an event within a calendar day |
Name | Required | Type | Description |
---|---|---|---|
allDay | false | javax.el.ValueExpression
(must evaluate to boolean )
|
Treat all calendar events as "all-day long" events
If not specified, the default value is "false". |
calendarEndDate | false | javax.el.ValueExpression
(must evaluate to java.util.Date )
| End of range of calendar days to display |
calendarStartDate | false | javax.el.ValueExpression
(must evaluate to java.util.Date )
| Start of range of calendar days to display |
cellClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The CSS class to use when rendering the calendar day table cell |
columnHeaderClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The CSS class to use when rendering the calendar column header |
dayVar | true | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of the variable reference to the current calendar day |
displayAllIntervals | false | javax.el.ValueExpression
(must evaluate to boolean )
| Display all time intervals, including those that do not contain an event |
displayLeftHeader | false | javax.el.ValueExpression
(must evaluate to boolean )
| Display time labels in leftmost column |
displayUnits | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
Unit of display (month, week, day)
If not specified, the default value is "month". Valid values are:
|
endHour | false | javax.el.ValueExpression
(must evaluate to integer )
| Ending hour to display within a day (23=11pm) |
eventClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The CSS class to use when rendering a calendar event |
events | false | java.lang.String | List of ICalendarEvent objects or ICalendarEventProvider to display in the calendar |
eventVar | true | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of the variable reference to the current calendar event |
first | true | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
|
Index of first item in model to display (zero-based)
If not specified, the default value is "0". |
headerClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The CSS class for header cells |
id | false | java.lang.String | Control identifier |
initialDate | false | javax.el.ValueExpression
(must evaluate to java.util.Date )
| The date to initially display in the calendar |
rendered | false | javax.el.ValueExpression
(must evaluate to boolean )
|
True to render control; false to ignore it
If not specified, the default value is "true". |
rows | true | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Number of rows to display per page |
startHour | false | javax.el.ValueExpression
(must evaluate to integer )
| Starting hour to display within a day (0=midnight) |
timeIncrement | false | javax.el.ValueExpression
(must evaluate to integer )
|
Increments of time to display within a day
If not specified, the default value is "30". |
timeslotLabelClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The CSS class to use when rendering the timeslot label |
timeslotLabelFormat | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The time format used for the timeslot header column |
value | false | java.lang.String | Calendar Provider to supply unit paging and expose ICalendarDay row objects |
var | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of the variable reference to the current calendar day |
Output generated by Vdldoc View Declaration Language Documentation Generator.