TagLib: Calendar

context

Description

Ensures that a  SOCS 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.

Note:  This context tag represents the state of the session to the SOCS calendar service. This <socs:context> upgrades any existing <cal:context> in pageContext or session to <socs:context>. If the service type is SOCS then it should be upgraded as soon as possible. Otherwise it will create and use base tags and beans instead of  SOCS specific (e:g: <cal:event> instead <socs:event>)

Tag Body


JSP or Empty

Restrictions

Since the calendar context is saved across requests the properties are also available for use across requests. This can be used only for SOCS, hence should be in sun-one directory only. It can not be used witout a prior <cal:context> in page or session.

Attributes

The tag has the following attributes:

Attribute

Description

Req'd?

config
Specifies the "configuration" for which a calendar context should be retrieved.
No
test

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

No

Properties

The 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. 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
calIdsEmpty
Indicates status of the "calid" list.  
Boolean
Get
reminderEmail
The email address to which to send reminders.
String
Get

Example(s)

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