TagLib: Calendar

context

Description

Ensures that a calendar context is present within the current pageContext. This tag must appear, at least once, before all other tags within the Calendar taglib.  If config is not specified, then a search for a useable configuration name is performed in the following fashion:
  1. Attempt to retrieve the current calendar configuration name from the page context.  If that succeeds, use it.  If the retrieval fails...
  2. Attempt to retrieve the current calendar configuration name from the session.  If that succeeds, store it on the page context and use it.  If the retrieval fails...
  3. From the list of all SSOAdapter configuration names, try to find the first useable calendar configuration name.  If that succeeds, store it in the session and page context and use it.  If it is not possible to find a useable calendar configuration name, the context tag will fail.
Once a configuration name has been determined, an attempt is made to acquire an appropriate calendar context object.  This is done in the following fashion:
  1. Attempt to retrieve a calendar context from the page context, and verify it matches the configuration (using the previously acquired configuration name).  If that succeeds, use it.  If that fails...
  2. Attempt to retrieve a calendar context from the user's cache of mail contexts.  If that succeeds, store it on the page context and use it.  If the retrieval fails...
  3. Create an SSOAdapter object using the previously acquired configuration name.  Create a calendar context, and bind it with the SSOAdapter object.  Store the calendar context in the context cache as well as the page context.
In this way, if a calendar context has been previously referenced on a page, or within the session, then the config attribute may be omitted, and the most recently referenced context will be retrieved.

Tag Body


JSP or Empty.

Restrictions

Since the calendar context is saved across requests the properties are also available for use across requests.

Attributes

This tag has the following attributes:

Attribute

Description

Req'd?

config
Specifies the "configuration" for which a calendar context should be retrieved.
No
test
Permits testing of service availability.  Operates according to the following table:

Service Available:
Service Not Available:
test = "true":
Evaluate tag body.
Skip tag body.
test = "false":
Skip tag body.
Evaluate tag body.

No

Properties

This tag provides access to the following properties:

Property

Description

Type

Access

errorCode
Returns errors status of failed command tags.
  • CAL_001:  Invalid date format.
String
Get
eventCount The size of the current event list. Integer
Get
eventSize
Same as eventCount.
Integer

taskCount
The size of the current task list.
Integer
Get
calendarID
The current calendar ID.
String
Get
eventsEmpty
Indicates status of the events list.
Boolean
Get
tasksEmpty
Indicates status of the tasks list.
Boolean
Get
userTheOwner
Indicates whether the user is the owner of the current calendar.
Boolean
Get

Example(s)

<%-- calendar context --%>
<cal:context/>