+

Search Tips   |   Advanced Search

Integrate the Person card and online status in a custom portlet


If IBM WebSphere Portal is configured to work with IBM Sametime , we can integrate the person card and online awareness in a custom portlet. Person names then appear with a dynamic status indicater. Users of the portlet can move the cursor over the name of an active person and then click Click for Person Card.

The Person card includes person details in a collapsible section. If a photo of the person is available in the repository, the Person card also displays the photo. The photo enlarges when you hover over it with the mouse. The person card also includes options for viewing the profile of a person, chatting, and more.

The Person card is provided using the person tag of the Collaborative Services API.

To integrate the Person card and online status in a custom 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

    • OBJID

    • CN

    Where OBJID corresponds to the objectId of the user.

To integrate the Person card and online status in a custom portlet using live text Microformat. Add the following lines to the page:

  1. Person card with online status:
    <span class='vcard X-sametime-resolve'>
    
    Person card without online status:
    <span class='vcard'>
    

  2. This line adds a user display name.
    <a class='fn' href='javascript:SemTagMenu.a11y(event)' style='color:black; text-decoration:none;'     onclick='return false;'>{displayName}</a>
    

  3. Any of the class 'email', 'uid' and 'objectId' are sufficient as long as they resolve to a unique user.
    <span class='email' style='display:none;'>{email id}span class='email' style='display:none;'>{email id}</span>
    
    <span class='uid' style='display:none;'>{LDAPDN}span class='uid' style='display:none;'>{LDAPDN}</span>
    
    <span class='objectId' style='display:none;'>{objectId}span class='objectId' style='display:none;'>{objectId}
    </span></span>
    

In the following example, <%@taglib uri="/WEB-INF/tld/people.tld" prefix="pa" %> interacts with Collaborative Services. The first % statement is a reference to the Collaborative Services tag library. The pa:person value="wpsadmin@acme.com" valueType="EMAIL" statement uses the Collaborative Services person tag to display the name of a person 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: Collaborative Services API