Inserting person menu tags

With client side tagging support, you can add Person Menus and Person Menu Extensions to a portlet.

If you have targeted a WebSphere® Portal V6.1 server, you can add Person Menus and Person Menu Extensions. Person Menu displays a set of contact information about the selected person (such as telephone number). When you drag a Person Menu object from the palette into a portlet JSP, a person menu appears into which you can specify hcard attributes. Person menu extension allows the user to extend the person menu, by offering capabilities to write JavaScript for actions that can be executed, or actions that are targeted. You can also add more than one extension.

To insert a Person Menu in a JSP file:

  1. Double-click on a JSP file to open it in Page Designer.

  2. Select the

    Portlet drawer in the Palette view.

  3. Drag and drop the

    Person Menu object from the Palette view onto the page. Alternatively, select

    Insert | Portlet | Person Menu from the menu. The Insert Person Menu dialog opens in which you can specify the following hcard attributes:

    • Name

    • Email

    • Address (optional)

    • Telephone number (optional)

  4. Click Finish. To see the code that was inserted, click on the Source tab.

The WebSphere Portal Person Menu syntax is as follows:

<div class="vcard">
                   <span class="fn">name</span>
                   <span style="display: none" class="email">name@ibm.com</span>
     </div> 

To insert a Person Menu Extension in a JSP file:

  1. Double-click on a JSP file to open it in Page Designer.

  2. Select the

    Portlet drawer in the Palette view.

  3. Drag and drop the

    Person Menu Extension object from the Palette view onto the page. Alternatively, select

    Insert | Portlet | Person Menu Extension from the menu. The Insert Person Menu Extension dialog opens in which you can insert extended attributes like the following:

    • Action details :

      • ID (Enter a unique ID)

      • JavaScript (Enter the Javascript name that has the action that will be invoked when the menuItem is selected. This should be available at the following directory: [PortalServer Home]\ui\wp.tagging.liveobject\semTagEar\Live_Object_Framework.ear\liveobjects.war\javascript.)

      • Label

      • Description

    • Specify ShowIf: ShowIf. In this field, specify the function that would decide the visibility of the Person Menu extension. The argument of the function should be '@@@ARGS@@@)'.

    • Specify Action: Action. In this field, specify the function that is executed when the Person Menu extension is clicked.

  4. Click Finish. To see the code that was inserted, click on the Source tab.

The WebSphere Portal person menu extension syntax is as follows:

<div class="com.ibm.portal.action" style="display:none;">
		<span class="action-id">doAction</span>
		<span class="action-impl">/javascript/doAction.js</span>
		<span class="action-context">person</span>
		<span class="action-label">Order ID</span>
		<span class="action-description"">Person Menu Extension/span>
		<span class="action-showif""">doAction.showif</span>
		<span class="action-url""">javascript:doAction.execute(@@@ARGS@@@)</span>
	< /div>

 

Related concepts

Person tagging client support