Portalizing Domino Applications for Websphere Portal

 < Day Day Up > 


4.7 Integration via people awareness

This integration technique will add value to your portlets by exploiting the people awareness services provided by WebSphere Portal. This integration technique adds real-time collaboration among the people involved in the application.

4.7.1 People awareness

If you extend the portal to offer people awareness features, portal users will see references to people in collaborative portlets. These references to individuals and groups are links that let portal users see and contact others with whom they might want to work. Wherever people links appear, portal users can display a menu of actions for contacting and working with the individuals and groups named by the link. If you have enabled Lotus Sametime to work with the portal, people links include the online status indicator that shows whether a person is active, away, offline, or in a Do Not Disturb state.

People links

When portal users click the name of (or the icon for) a person or group, a menu appears that provides actions linking them to other portal users. The actions that are visible on people link menus depend on the following factors:

The complete set of actions that users might see from people links depends on which Lotus companion products for advanced collaboration are installed and enabled to work with the portal.

Online presence

If you have enabled Lotus Sametime to work with the portal, portal users can see each other's online presence in their person links according to the status options they have set in their Sametime client:

Tip 

Portal users can select Options → Preferences → Status in their Sametime Connect clients to customize the messages that appear for each online state and to control the period of time in which keyboard or mouse inactivity automatically switches their status from Active to Away.

In this section we describe how to use this integration technique to add some of the collaborative services included with WebSphere Portal. Before we begin, we first review what the Collaborative Components are.

Collaborative Components

Collaborative Components or Collaborative Services are a set of JSP tags and Java objects that enable the inclusion of Lotus collaborative functionality to new or existing portlets.

These components allow the seamless interaction of the Lotus family of products with the Java-based portlets that run on WebSphere Portal. These methods of interaction do not replace the product-specific APIs, but facilitate the integration of such products within the portal infrastructure.

The Collaborative Components provide standardized access to applications, through an easy to use API that is optimized for a collaborative portal, and a consistent security model across all Lotus Software family of products.

This API is written in Java and isn't platform-specific, so it provides a multiplatform solution, with no dependence on UI-specific implementation. Therefore, these components are very useful tools for writing pervasive portlets.

The services are the following:

Further information on usage and services is available from the WebSphere Portal Infocenter.

Note 

The Lotus Notes productivity portlets that are installed with Portal are not implemented with the DominoService object. Therefore, do not refer to those portlets as examples. Instead, refer to the samples that are installed with the Collaborative Components enterprise application (cs.ear).

The Java Collaboration Components API is explained in the next chapter because it requires further Java knowledge. For now, our discussion concentrates on the People tags components, which work with JSP Tag libraries.

PeopleService tags

The PeopleService tag library contains the following necessary tags:

people

peopleinit

Both the people and peopleinit tags generate HTML and require Java and JavaScript on the client that are compatible with the WebSphere Portal.

4.7.2 Implementation of the technique

Now that your portlets are Click to Action enabled, the next step is to implement people awareness by including one the PeopleService tags which is available on WebSphere Portal. People awareness services are available at the JSP level and are incredibly easy to use.

The enablement consists basically of two steps on each JSP you want to enable:

Enabling the CustomerList portlet

The CustomerList portlet consists only of one JSP file. Follow these steps to enable the portlet:

  1. Open the /jsp/CustomerList/View.jsp file.

  2. Copy the following line at the beginning of the file:

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

  3. In the JSP file, in the results file of the display table, insert in the third column, surrounding the <Domino:viewitem col="3"/> tag, the peopleservice tags as follows:

    <peopleservice:person><Domino:viewitem col="3"/></peopleservice:person>

    Important: 

    Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.

  4. Save and close the View.jsp file.

    Note 

    You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.

Enabling the CustomerDetails portlet

The CustomerDetails portlet is composed of two JSPs. The View.jsp file doesn't display any names, so you do not need to enable people awareness on this file. The CustomerDetails.jsp file displays people names, so you need to enable this JSP.

  1. Open the /jsp/CustomerDetails/CustomerDetails.jsp file.

  2. Copy the following line at the beginning of the file:

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

  3. In the JSP file on the results table there is a row called Account Owner. Enable this field by including the following peopleservice tags:

    <peopleservice:person><Domino:item name="ownerName"/></peopleservice:person>

    Important: 

    Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.

  4. Save and close the CustomerDetails.jsp file.

    Note 

    You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.

Enabling the CustomerContacts portlet

The CustomerContacts portlet is composed of two JSPs. The View.jsp file doesn't display any names, so there is no need to enable people awareness in this file. The CustomerContacts.jsp file displays people names, so you need to enable this JSP using the following steps:

  1. Open the /jsp/CustomerContacts/CustomerContacts.jsp file.

  2. Copy the following line at the beginning of the file:

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

  3. In the JSP file on the results table there is a column called Contact Name.Enable this field by including the peopleservice tags as follows:

    <peopleservice:person><Domino:viewitem col="2"/></peopleservice:person>

    Important: 

    Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.

  4. Save and close the CustomerContacts.jsp file.

    Note 

    You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.

Enabling our CustomerSalesActivities portlet

The CustomerSalesActivities portlet is composed of two JSPs. The View.jsp file doesn't display any names, so there is no need to enable people awareness in this file. The CustomerSalesActivities.jsp file displays people names, so you need to enable this JSP using the following steps:

  1. Open the /jsp/CustomerSalesActivity/CustomerSalesActivities.jsp file.

  2. Copy the following line at the beginning of the file

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

  3. In the JSP file on the results table there are two columns called Sales Person and Contact Name. Enable these fields by including the peopleservice tags as follows:

    ... <peopleservice:person><Domino:viewitem col="4"/></peopleservice:person> </td> <td> <peopleservice:person><Domino:viewitem col="5"/></peopleservice:person> ...

    Important: 

    Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.

  4. Save and close the CustomerSalesActivities.jsp file.

    Note 

    You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.

All of your portlets are now enabled, and they can be deployed in the WebSphere Portal just as you did previously. You should see your portlets working as shown in Figure 4-41.

Figure 4-41: Customer Information portlets with people awareness


 < Day Day Up > 

Категории