Add the person tag to a portlet

 

+

Search Tips   |   Advanced Search

 

Use the person tag of the Collaborative Services API in a custom portlet to provide online awareness for users of the portlet.

  1. Add the following line to the page:

        <%@taglib uri="/WEB-INF/tld/people.tld" prefix="pa"%>
    

  2. Include a statement in the page similar to the following line:

        <pa:person value="CN=John Smith,OU=SALES,O=ACME" valueType="LDAPDN" displayName="John Smith" />
    

The displayName attribute is optional.

The supported types for valueType are:

  • EMAIL
  • LDAPDN
  • MEMBERDN
  • WMMID

In the following example, the bolded portions interact with Collaborative Services. The first % statement is a reference to the Collaborative Services tag library. The bold statement uses the Collaborative Services person tag to display a person's name as a live link.

<%@taglib uri="/WEB-INF/tld/people.tld" prefix="pa" %>
<%@taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %>
portletAPO:init Hello example <h1>Collaborative Services Hello JSP</h1>
<br />
<h2>Hello,<pa:person value="wpsadmin@acme.com" valueType="EMAIL" /> !</h2>

 

Parent Topic

Collaborative Services API

 

Related tasks

Customizing person menu actions
Logging for Collaborative Services

 

Related reference

Collaborative Services samples
Collaborative Services API