+

Search Tips   |   Advanced Search

Integrate the Business card and online status in a custom portlet

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

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

The Business card is provided using the person tag of the Collaborative Services API. There are two methods to integrate the Business card...

  • Using the Person tag of the collaborative API
  • Using the live text microformat


> Integrate the Business card using the Person tag of the collaborative API

  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" isActive="true/false" />

    The displayName and isActive attributes are optional. The isActive attribute controls the formation of the Business card for a users name, depending on the activity of the user.

    • If a user is active and selectable, then the isActive attribute is true.
    • If a user is inactive and non-selectable, then the isActive attribute is false.

    The supported types for valueType are:

      EMAIL <pa:person
      value="wpsadmin@acme.com"
      valueType="EMAIL"
      displayName="John Smith"
      isActive="true/false" />
      LDAPDN <pa:person
      value="CN=John Smith,OU=SALES,O=ACME"
      >valueType="LDAPDN"
      displayName="John Smith"
      isActive="true/false" />
      MEMBERDN <pa:person
      value="CN=John Smith,OU=SALES,O=ACME"
      valueType="MEMBERDN"
      displayName="John Smith"
      isActive="true/false" />
      OBJID <pa:person
      value="Z9eAe1JRU6N5FDRRANP14GRR47Q5CC38ANPLCI3"
      valueType="OBJID"
      displayName="John Smith"&nbp;
      isActive="true/false" />
      CN <pa:person
      value="wpsadmin"
      valueType="CN"
      displayName="John Smith"&nbp;
      isActive="true/false" />
      WMMID <pa:person
      value="wpsadmin"
      valueType="WMMID"
      displayName="John Smith"
      isActive="true/false" />

    Where OBJID corresponds to the objectId of the user.


Integrate the Business card using live text microformat

To integrate the Business card using live text microformat...

  1. Add the following lines to the page:

    1. Business card with online status:

        <span class='vcard X-sametime-resolve'>

    2. Business card without online status:

        <span class='vcard'>

  2. Include this line to add 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='userObjectId' style='display:none;'>{objectId}span class='userObjectId' style='display:none;'>{objectId}</span></span>
      


Example

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 and the person tag