TagLib: AddressBook

entry

Description

This tag denotes a reference to the current entry bean within an enclosing collection tag, e.g., <ab:entries>. The body of this tag may contain get/set tags that will generate 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:
 

Attribute

Description

Req'd?

id Specifies the bean id of the bean to create. No
name Specifies the bean id of the bean to use. No
entryid Specifies the address book entry id to use. No
elementType When used in conjunction with id, specifies what type of entry bean to create.  May be "contact" or "group".
No 

Properties

The tag provides the following bean properties:

Property

Description

Defined for Entry Type

Type

Access

fn First name. Contact
String
Get/Set
ln Last name. Contact
String
Get/Set
em Email address. Contact
String
Get/Set
bp Business phone. Contact
String
Get/Set
hp Home phone. Contact
String
Get/Set
fp Fax phone. Contact
String
Get/Set
mp Mobile phone. Contact
String
Get/Set
pp Pager phone. Contact
String
Get/Set
cn
Entry CN.
Contact, Group
String
Get
entryid id of address book entry. Contact, Group
String
Get/Set
 elementtype  Type of entry bean.  May be "contact" or "group". Contact, Group
String
Get/Set 

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>