TagLib: AddressBook

context

Description Ensures that an address book context is present within the current pageContext. This tag must appear, at least once, before all other tags within the AddressBook taglib.  If config is not specified, then a search for a useable configuration name is performed in the following fashion:
  1. Attempt to retrieve the current addressbook configuration name from the page context.  If that succeeds, use it.  If the retrieval fails...
  2. Attempt to retrieve the current addressbook configuration name from the session.  If that succeeds, store it on the page context and use it.  If the retrieval fails...
  3. From the list of all SSOAdapter configuration names, try to find the first useable addressbook configuration name.  If that succeeds, store it in the session and page context and use it.  If it is not possible to find a useable addressbook configuration name, the context tag will fail.
Once a configuration name has been determined, an attempt is made to acquire an appropriate addressbook context object.  This is done in the following fashion:
  1. Attempt to retrieve an addressbook context from the page context, and verify that it matches the configuration (using the previously acquired configuration name).  If that succeeds, use it.  If that fails...
  2. Attempt to retrieve an addressbook context from the user's cache of addressbook contexts.  If that succeeds, store it on the page context and use it.  If the retrieval fails...
  3. Create an SSOAdapter object using the previously acquired configuration name.  Create an addressbook context, and bind it with the SSOAdapter object.  Store the addressbook context in the context cache as well as the page context.
This way, if an addressbook context has been previously referenced on a page, or within the session, then the config attribute may be omitted, and the most recently referenced context will be retrieved.
Tag Body JSP or Empty
Tag Parent n/a
Restrictions n/a
Attributes This tag has the following attributes:  
Attribute Description Req'd?
config
Specifies the "configuration" for which an addressbook context should be retrieved.
No
test
Permits testing of service availability.  Operates according to the following table:

Service Available:
Service Not Available:
test = "true":
Evaluate tag body.
Skip tag body.
test = "false":
Skip tag body.
Evaluate tag body.

No
Properties This tag provides the following bean properties:
Property Description Type
Access
errorCode
Returns error status of a failed command tag.
  • Empty error code indicates a generic tag execution failed error.
  • AB_001 - Add/Modify failed because last name not entered.
String

numEntries Number of items in the entries collection. Integer
Get
entriesEmpty Whether or not the entries collection is empty. Boolean
Get
numGroupmembers
Number of items in the groupmembers collection. Integer
Get
groupmembersEmpty
Whether or not the groupmembers collection is empty. Boolean
Get
numMemberchoices
Number of items in the memberchoices collection. Integer
Get
memberchoicesEmpty
Whether or not the memberchoices collection is empty. Boolean
Get
numContacts
Number of items in the contacts collection. Integer
Get
contactsEmpty
Whether or not the contacts collection is empty. Boolean
Get
Example(s)
<%@ page errorPage="/jsp/errorpage.jsp" %>
<%@ taglib uri="/taglibs/ips_taglib_ab.jar" prefix="ab" %>

<ab:context/>

<ab:fetch any="$(any)" 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>