Back Forward Harness and Section forms
Completing the Design tab — Adding a Menu Bar

About Harnesses

This control is deprecrated in Pega 7.

Advanced featureIn a composite portal, a menu bar can allow the user to switch among spaces. In a flow action or sections within a user form, a menu bar can execute activities or call JavaScript functions.

The structure of a menu bar is defined by a navigation rule. Because the navigation rule undergoes stream processing and can reference clipboard property values, the runtime menu choices available may differ based on user and context.

Menu Bar example

Follow these steps to include a menu bar in a composite portal. This facility depends on rules of various types:

Create a new navigation rule in that defines the structure and elements of the menu. (See About Navigation rules)

Create a section to hold the menu.

A new section contains an initial layout, in SmartLayout format. From the Layout tab, select and add a second layout, of type Free Form with one row and one column, below the SmartLayout. Delete the SmartLayout.

Drag to adjust the width and height of the cell to hold the expanded menu display. Using default styles, each menu row (or tab) requires about 30 pixels of height. You can fine-tune the cell size later.

Click the down-arrow Arrow at the right end of the Advanced control group and select the menu bar control. Drag the control. When the pointer changes shape to indicate that you can drop the layout, release the mouse button.

Field

Description

Property

Retain the placeholder property pyTemplateMenuBar. (This property is not used.)

Label Check the checkbox to use the default label for the property; or uncheck it and, in the field that appears, select or create a label.
Label format Select a format from the available options.
Default value

SmartPromptOptional. Enter a constant value for the property value, a property reference, or an expression, to be used only when the user form or flow action form appears in read-write mode rather than read-only mode.

Click magnifying glass to start the Expression Builder.

NoteChoose a default value that speeds data entry. When the system renders a harness or section in read-only mode (for example because the read-write mode requires a privilege that the current user does not hold), the default value does not appear, because data entry is not permitted.

Visibility Select to determine when the property value is to appear. Always is the default. (If this setting is not applicable, the cell contents are blank.)
  • Choose Always, If Not Blank, or If Not Zero to have the field appear or be hidden based on the property value at the time this area of the user form (section or flow action) is first presented or refreshed. This condition is checked only once.
  • Choose Other Condition to make the visibility depend on a when condition rule or a Java expression.

Check the Reserve space when hidden checkbox, if it appears, to have a blank area appear in the section when the paragraph is hidden.

CautionDo not make an input field invisible if your application expects user input on the field. When a user submits an HTML form, an input field that is not visible is not included in the HTTP details.

Check the Required checkbox to make this a required field.

Field

Description

Edit Options Select an edit mode for this control. The edit mode of the control, specified here, takes precedence over section and harness settings.
  • Auto — the control uses the edit mode of the section or harness in which it appears. If the section is set to Read Only, then the control is Read Only. If the section is set to Auto, then the control uses the edit mode of the harness. For example, a New harness is editable, while a Review harness is read only.
  • Editable — the control is editable, regardless of the edit mode of the enclosing layout.
  • Read Only — the property value is presented in read-only mode always, or based on a when condition rule or client-side test, even when the enclosing layout is in read-write mode.
Advanced Options

NoteThe best practice is to define custom styles in the skin.

  • Cell read-write style — Type the name of the custom style, for example, custom_stylename, that you want to apply to this cell when the user form or flow action form appears in read-write mode.
  • Cell read-only style — Type the name of the custom style, for example, custom_stylename, that you want to apply to this cell when the user form or flow action form appears in read-only mode.
  • Cell inline style — Type CSS code to define an inline style. As a best practice, define custom styles in the skin. See Skin form — Components tab — General — Custom styles.

Configuring parameters for this deprecated control is only supported in Internet Explorer.

Test

  1. Save the section.
  2. Add this section to the harnesses that define the spaces of the composite portal. (Typically, the menu appears in the same panel location — for example Top — in each space.)
  3. Add the composite portal to your access group.

Refine the menu structure

You can extend the XML Stream rules to take advantage of four features that make the menu bar facility flexible and powerful:

Refine menu styles

You can define styles for menu bars in the skin. You can also create custom menu formats in the skin. See Skin form — Components tab — Controls — Menus.

Applying a custom menu format

  1. Add a menu bar control to your layout.
  2. Click the magnifying glass to open the cell Properties panel and then click the magnifying glass beside the Control field to open the Menu Bar Parameters dialog.
  3. In the Format field, press the down arrow to select the custom format that you want to apply.

Up About Flow Actions

Up About Harnesses

Up About Sections