+

Search Tips   |   Advanced Search


Providing online awareness for a custom portlet

In a custom portlet, you can provide online awareness for users of the portlet.

Online awareness is provided by using the person tag of the Collaborative Services API.

To provide awareness for a custom portlet:

  1. Add the following line to your page:

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

  2. Include a statement in your 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

      The UID attribute must be present in the LDAP repository and have a unique value. This value is passed when valueType is set to 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