Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

context

Description

Ensures that a mail context is present within the current pageContext. This tag must appear, at least once, before all other tags within the Mail taglib.  If config is not specified, then a search for a useable configuration name is performed in the following fashion:Attempt to retrieve the current mail configuration name from the page context.  If that succeeds, use it.  If the retrieval fails... Attempt to retrieve the current mail configuration name from the session.  If that succeeds, store it on the page context and use it. If the retrieval fails... From the list of all SSOAdapter configuration names, try to find the first useable mail 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 mail configuration name, the context tag will fail.Once a configuration name has been determined, an attempt is made to acquire an appropriate mail context object.  This is done in the following fashion:Attempt to retrieve a mail 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... Attempt to retrieve a mail 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... Create an SSOAdapter object using the previously acquired configuration name.  Create a mail context, and bind it with the SSOAdapter object.  Store the mail context in the context cache as well as the page context.In this way, if a mail 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

None.

Attributes

The tag has the following attributes for which the Required value is “No”:

config

Specifies the "configuration" for which a mail context should be retrieved.

test

Permits testing of service availability. Operates according to the following table:

Service Available

Evaluate tag body when test = true and Skip tag body when test = false.

Service Not Available

Skip tag body when test = true and Evaluate tag body when test = false.

Properties

The tag provides the following bean properties for which for which the Type values are “String”, “Integer” and “Boolean” and the Access value is “Get”:

errorCode

Indicates the error code in case the execution of a command tag fails. Possible values:

  • Empty error code indicates a generic tag execution failed error.

  • MAIL_001 - Unable to send message because of Invalid email address.

  • MAIL_002 - Unable to send message.

  • MAIL_003 - Attempt to create a folder that already exists.

  • MAIL_004 - Failed to create folder.

inboxNumMsgs

Number of messages in the INBOX.

inboxNumUnreadMsgs

Number of unread messages in the INBOX.

inboxNumNewMsgs

Number of new messages in the INBOX.

numMsgs

Number of messages in the current folder.

numUnreadMsgs

Number of unread messages in the current folder.

numNewMsgs

Number of new messages in the current folder.

signature

User's predefined signature.

atmsgend

A boolean that indicates if there is a message following the message from which was fetched the current lines collection.

atmsgstart

A boolean that indicates if there is a message prior to the message from which was fetched the current lines collection.

nextmsgidx

The index of the message following the message from which was fetched the current lines collection.

prevmsgidx

The index of the message prior to the message from which was fetched the current lines collection.

presetEmpty

A boolean that indicates whether or not the user has any predefined messages.

doMsgInclude

A boolean that indicates whether or not to include the original message within a reply message.

includeSig

A boolean that indicates whether or not to append the user's signature onto an outgoing message sent with sendmessage.

Example(s)
<%-- example of context tag usage --%>
<mail:context>
...
<mail:context>
<p>New Message:  <mail:get property="inboxNumNewMsgs"/>
</mail:context>