Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

fetch

Description

This tag builds a collection of the type specified by the collection attribute. The Mail collections may be considered in the following fashion: A user possesses a collection of "folders". A folder possesses a collection of "messages". A message possesses a collection of "lines". A fetch of any given collection type creates a "current" collection of that type. For example, a fetch of a "messages" collection creates the current "messages" collection. These "current" collections are associated with the current Mail context. If an error occurs during processing, the tag body will be evaluated and the remainder of the page will be skipped.

Tag Body

JSP

Restrictions

n/a

Attributes

The tag has the following attributes for which the Required values are “Yes” and “See below”:

collection

Identifies the type of collection to fetch.

id

Identifies which collection to fetch.

sb

Indicates which "field" to sort by.

sd

Indicates which direction to sort.

  • If collection is "folders":

    • id is ignored.

    • sb is ignored.

    • sd may be “up” or “down”.

  • If collection is "messages":

    • id identifies from which folder to fetch the messages.

    • sb identifies by which message field to sort by.

    • sd may be "up" or "down".

  • If collection is "lines":

    • id identifies which message to fetch.

    • sb is ignored.

    • sd is ignored.

    A fetch of a "lines" collection assumes that id refers to a message within a "messages" collection that was fetched previously, using the same mail context.

Properties

n/a

Example(s)
<%-- example of fetch tag --%>
<mail:context/>
...
<mail:fetch collection="messages" id="INBOX" sb="date" sd="down">
<p>Fail.
</mail:fetch>
...
<mail:fetch collection="lines" id="0">
<p>Fail.
</mail:fetch>
...
<mail:lines>
	<mail:line>
		<mail:get property="text"/>
	</mail:line>
</mail:lines>