Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

fetch

Description

The fetch tag loads the specified collection within the current addressbook context. If no attributes are specified, the entire addressbook will be returned within the entries collection. All of the search attributes support simple wildcard expressions, using the '*' character. If no wildcard is specified, the '*' character is prepended and appended to the search expression, thus yielding a search pattern that produces results matching any entry that at least contains the requested string. If an error occurs during processing, the tag body will be evaluated, and the remainder of the page will be skipped.

Tag Body

JSP

Tag Parent

n/a

Restrictions

If the fetch tag uses the 'any' attribute, then no other attribute other than 'sb' and 'sd' can be used.

Attributes

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

sb

"Sort By" attribute. Can have the search attribute names, for example 'ln' etc. as values, except for 'any'.

sd

"Sort Direction" attribute. Can have values - 'up', 'down'.

fn

Search for "First Name"

ln

Search for "Last Name"

em

Search for "Email Address"

bp

Search for "Business Phone"

hp

Search for "Home Phone"

fp

Search for "Fax Phone"

mp

Search for "Mobile Phone"

pp

Search for "Pager Phone"

any

Search all fields for any match.

elementType

Specifies the type of element (entry) to fetch. May be "contact", "group", or "all". Default is "contact".

groupid

The id of a group bean within the entries collection that identifies from which group entries are to be fetched.

collection

Specifies to which collection the results of this fetch operation should be stored. May be "contacts", "groupmembers", "memberchoices", or "entries". Default is "entries". If "contacts" is specified, groups are expanded to their constituent contacts.

exact

A boolean that indicates the following: when false, implicitly append and prepend a "*" to the search patterns. When true, use the pattern explicitly specified. Default is "false".

Properties

n/a

Example(s)
<%@ page errorPage="/jsp/errorpage.jsp" %>
<%@ taglib uri="/taglibs/ips_taglib_ab.jar" prefix="ab" %>

<ab:context/>
<ab:fetch ln="$(ln)" fn="$(fn)" bp="$(bp)" em="$(em)" hp="$(
hp)" fp="$(fp)" mp="$(mp)" pp="$(pp)" sb="ln" sd="up">

		Error in Looking up address book.

</ab:fetch>

Number of Address Book entries:

<ab:context>
	<ab:get property="numEntries"/>
</ab:context>

<ab:entries>

	<ab:entry>
		Entry Id: <ab:get property="entryid"/>
		First Name: <ab:get property="fn"/>
		Last Name: <ab:get property="ln"/>
		Email: <ab:get property="em"/>
	</ab:entry>
</ab:entries>