Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

contact

Description

This tag denotes a reference to the current contact bean within an enclosing collection tag, for example, <ab:contacts>. The body of this tag may contain get or set tags that will generate output derived from the contents of this bean tag.

Tag Body

JSP

Tag Parent

<abPrefix:contacts>

Restrictions

Only one of id, name, or entryid should be used at a time. If no attributes are specified, the current entry in the parent collection is used.

Attributes

This tag has the following attributes, which are not required:

id

Specifies the bean id of the bean to create.

name

Specifies the bean id of the bean to use.

entryid

Specifies the address book entry id to use.

Properties

This tag provides the following bean properties, which have the Type, String and Access, Get/Set:

fn

First name.

ln

last name.

em

Email address.

bp

Business phone.

hp

Home phone.

fp

Fax phone.

mp

Mobile phone.

pp

Pager phone.

entryid

Id of address book entry.

cn

Type of entry bean. May be contact or group.

Example(s)
<%-- Example 1 Current contact in the contacts collection --%>

<%@ 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:contacts iterate="true">
	<ab:contact>
		Entry Id: <ab:get property="entryid"/>
		First Name: <ab:get property="fn"/>
		Last Name: <ab:get property="ln"/>
		Email: <ab:get property="em"/>
	</ab:contact>
</ab:contacts>


<%-- Example 2 Retrieve a contact by entryid --%>

<ab:contact entryid="$(entryid)">
		First Name: <ab:get property="fn"/>
		Last Name: <ab:get property="ln"/>
		Email: <ab:get property="em"/>
</ab:contact>