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.
JSP
n/a
The tag has the following attributes for which the Required values are “Yes” and “See below”:
Identifies the type of collection to fetch.
Identifies which collection to fetch.
Indicates which "field" to sort by.
Indicates which direction to sort.
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".
n/a
<%-- 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>