Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

contacts

Description

This tag denotes a reference to the "contacts" collection, as constructed by an appropriate fetch tag. This tag will iterate upon its body until the collection is exhausted, or as constrained by the start and count properties. The start and count properties should only be set when the iterate attribute is set to "false".

Tag Body

JSP

Tag Parent

n/a

Restrictions

Address Book fetch should have happened prior to the invocation of this tag.

Attributes

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

id

Name of the contacts collection to create.

name

Name of the contacts collection to use.

iterate

A boolean that selects iteration. Default is "false"; the collection will not iterate.

beanid

During iteration, specifies a name by which the current bean may be retrieved from the PageContext.

Properties

This tag provides the following bean properties, which have the Type as Integer and Access as Get. The count and start attributes has Access as Get/Set:

index

Index of the current bean in the collection.

count

The number of iterations the collection should perform.

start

The zero based index from which to begin iteration.

end

The zero based index that denotes the item upon which iteration will terminate.

startOne

One-based start; suitable for presentation.

endOne

One-based end; suitable for presentation.

size

The size of the collection being paged.

nextPage

Whether or not there are more items in the collection, beyond the current iterations.

prevPage

Whether there are items in the collection preceding the current iterations.

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

<ab:context/>
<ab:fetch collection="contacts" elementType="all" groupid="${gid}">

		Error in Looking up address book.

</ab:fetch>

		Number of Address Book entries:

<ab:contacts iterate="true">
	<ab:contact>
		Name: <ab:get property="cn"/>
	</ab:contact>
/ab:contacts>

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: Attempt to retrieve the current addressbook configuration name from the page context.  If that succeeds, use it.  If the retrieval fails... 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... 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: 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... 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... 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:  

No

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