Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

entry

Description

This tag denotes a reference to the current entry bean within an enclosing collection tag. For example, <ab:entries>. The body of this tag may contain get/set tags that generates output derived from the contents of this bean tag.

Tag Body

JSP

Tag Parent

<abPrefix:entries>

Restrictions

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

Attributes

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

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.

elementType

When used in conjunction with id, specifies what type of entry bean to create. It can be "contact" or "group".

Properties

The tag provides the following bean properties for which the Defined for Enter Type is “Contact”, Type is “String”, and Access is “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.

cn

Entry CN.

entryid

id of address book entry.

elementType

Type of entry bean. It can be "contact" or "group".

Example(s)
<%-- Example 1 Current entry in the entries 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:entries iterate="true">
	<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>

<%-- Example 2 Retrieve an entry by entryid --%>

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