Adding people awareness to portlet JSP files
People awareness support allows you to insert the person link visually on your portlets. People awareness is available for any supported portlet type.
WebSphere Portal includes people awareness features, so that people's names can appear in portlets as hyperlinks that allow users to contact people with whom they might want to work. Wherever people links appear, portal users can click the link to display a menu of actions for collaborating (contacting and working) with the person named by the link. If you, as portal administrator, have also configured an IBM Lotus Instant Messaging and Web Conferencing server to work with the portal, people links indicate whether a person is Active, Away, Offline, or in a Do Not Disturb state.
The person link is available in the Palette view and in Page Designer. To insert a person link in a JSP file:
- Open a JSP file in the Design page in the Page Designer.
- Select the Portlet drawer in the Palette view.
- Drag and drop the Person Link object from the Palette view onto the page. Alternatively, select Insert > Portlet > Person Link from the menu. The inserted person tag is represented by the person link icon (
) in the JSP page.
- Type over the icon to specify a display name such as John Smith
- Select the person tag in the Design page. The Person Link page (pa:person) opens in the Properties view.
- Optionally, specify a name to send to Sametime in the Value property. If you do not specify this, the display name will be used. When you select the browse icon next to the Value field, the Select Page Data Object dialog opens. Several types of data sources are available. For example, you can specify the name to send to Sametime from a database.
When you add a Person Link to a JSP file, the workbench does the following:
- Inserts an empty <pa:person> tag.
<pa:person></pa:person>- Inserts the taglib directive in the JSP file.
<%@taglib uri="/WEB-INF/tld/people.tld" prefix="pa"%>- Allows you to provide the name of the person, called the display name.
<pa:person>John Smith</pa:person>- Allows you to provide the value attribute and its value. If not specified, the display name is used.
<pa:person value="CN=John Smith,OU=CAM,O=IBM">Smith, John</pa:person>
When a portal user clicks on the name of a person, or the icon for the person, a menu appears that provides actions linking them to other portal users. Different actions appear, depending on how the collaboration software is configured, and the online status of the person.
For more information, refer to the People awareness section, under Collaborating in the WebSphere Portal Information Center; or, see the Lotus Instant Messaging Help, available from the Downloads link on the IBM Lotus Software Web site.
Related tasks
Creating portlet JSP files