Back ForwardHow to extend the Developer portal menu with add-ons

Using XML Stream rules, you can add items to the menu structure of the Developer portal. Your menu choices appear in the Tools > Add-ons menu group.

NoteDon't confuse this facility, which extends the Tools menu on the Developer portal, with the general-purpose menu bar control used in composite portals. The XML Stream rules for both facilities follow the same syntax, but the menu bar is for user portals, not the Developer portal. For the menu bar, see Harness, section, and flow action rules — Adding a menu bar.

Menu structure

Process Commander builds the menus that a developer experiences from four sets of XML Stream rules. All have @baseclass as the first key part. At runtime, stream processing evaluates JSP tags to produce the menu structure displayed in a portal.

Syntax

An add-on menu XML Stream rule defines a (well-formed) XML fragment, not an entire document. The simple structure is:

<Item Value="myvalue" Caption="mycaption" onClick="function" />

where:

The XML Stream rule may contain JSP tags such as <pega:when >, <pega:reference > and <pega:include >. Menus may contain submenus up to five levels deep.

Four features make this simple structure flexible and powerful:

Example

An XML Stream rule named @baseclass.MarthasFavorites.MenuItem contains the following XML code:

<Item Value="MarthasFavorites"
   Caption="Martha report "
    onClick="showListInWindow('Data-Rule-Summary',
   'MJFavorite','true',Refresh')" />

When the developer selects Tools > Addons > Martha Report, the JavaScript function showListInWindow() executes the list view report named Data-Rule-Summary.MJFavorite.ALL and displays the resulting report output.

Building a menu Add-on

  1. Identify or build, and test, the processing that is to occur when a developer chooses the menu add-on.
  2. Create the XML Stream rule with @baseclass as the first key part and MenuItem as the final key part.
  3. Log out and log back in. Confirm that the new menu add-on appears under the Tools > Add-ons menu item.
  4. Test.

Call the JavaScript function showListInWindow() to present a list view report. Call the JavaScript function openUrlInWindow() to execute an activity.

Example

See Pega Developer Network articlePDN PRKB-25061 How to extend the Developer portal menus.

Menu customizations in V5.1 to V5.3

Version 5.4 introduces the add-on approach presented above. If you built customized Developer portal menus in older versions, your customizations are unlikely to work in V5.4. Revise them by following the instructions in this topic.

Definitions stream processing
Related topics About JavaServer Pages tags
About Portal rules
About XML Stream rules

UpUser Interface category