Back Forward Harness, Section, and Flow Action forms
Adding a URL

About Harness rules

 zzz Show all 

A URL in a layout provides the same capabilities as a button or icon, but uses the familiar blue underlined text as presentation. You can precede and follow a URL cell with static text in Label cells, achieving a presentation similar to an embedded link in a Web page:

You can recompute the interest due on this loan.

Follow these instructions to add a URL to a cell.

 zzz 1. Drag and drop the URL control

Click the down arrow (Menu) in the Basic control group (Basics) and select the URL control (Button). Drag the control to the desired cell. When the pointer changes shape to indicate that a single cell is selected, release the mouse button to drop the control.

If the cell is not empty, the dropped control replaces the current contents of the cell. Click the magnifying glass icon (Magnifying glass) to display the Cell Properties panel.

Complete the Cell Properties panel that appears. If the panel is pinned (Pinned), the wireframe presentation on the rule form changes immediately to reflect of your inputs. If the panel is not pinned (not pinned), click Apply to apply your inputs.

 zzz 2. Complete the Cell Properties panel — Top fields

Field

Description

Type

Select a function for this URL, from the predefined values on the drop-down list.

Typically, select CUSTOM to define a URL with a custom function. See Placing an Icon in a Layout Cell (Built In Types) for a description of the other types.

Caption

SmartPromptEnter brief text that is to appear as the underlined blue link. (If this text is to be localized. enter no more than 64 characters. Click the pencil icon Pencil to review or create the field value rule supporting localization, with a middle key part of pyButtonLabel.

Tooltip

SmartPromptOptional. Enter a sentence or phrase identifying to users of the form the purpose and function of the URL. As a best practice, start the ToolTip text for an input field with a verb.

If this text is to be localized. enter no more than 64 characters. Click the pencil icon Pencil to review or create the field value rule supporting localization, with a middle key part of pyActionPrompt.

 zzz 3. Complete the Cell Properties panel — General tab

Complete the General tab.

Field

Description

Do Action
Target


Window Width


Window Height

These fields appear only when the type is CUSTOM.

See Complete additional information for custom buttons below.

Visible

Select to determine when the URL appears. (If this setting is not applicable, the cell contents are blank.)

  • Choose Always to have the URL appear or be hidden based on the visibility of the enclosing section or flow action when the form is first presented or is refreshed. This condition is checked only once.
  • Choose Other Condition to make the visibility depend on a when condition rule, a Boolean expression evaluated only once, or a test evaluated repeatedly upon JavaScript events.
Visible When

SmartPrompt If you selected Other Condition for the Visible field, complete this field. Enter an expression involving another property, or identify the When Name key part of a when condition rule. Specify one of three outcomes:

  • When condition rule — Enter the When Name key part of a when condition rule that determines the visibility of this field at runtime. The system uses the Applies To key part of the current rule in rule resolution to locate the when condition rule. Click the pencil icon (Pencil) to review or create the when condition rule.
  • Expression evaluated once — Enter an expression that returns true or false. This expression can involve multiple properties, function calls, and other syntax as supported by the <pega:when > JSP tag.
  • Simple Java expression evaluated upon JavaScript events — To dynamically control the visibility of this property with a JavaScript event, enter a simple comparison involving a target property and select the Run on Client? box. The result at runtime determines whether the content of this cell appears in read-only mode or in the mode of the enclosing layout.
    For example, enter .Color =="Blue" in this field to make this field visible when the property Color has the value Blue, and invisible otherwise. Depending on the state of the Run on Client check box, the comparison can be executed only once as the form is initially displayed, or dynamically. See Implementing dynamic form actions and the Client Event Editor.

A URL that is not visible is also disabled and cannot be clicked.

Wrap Text?

Select to cause the text to wrap within the cell.

Disabled?

Select to cause the URL to be disabled or enabled based on a test, even when the form is in read-write mode. Complete the next field to modify the effect of this check box.

Disabled Condition

SmartPromptOptional. This field appears only when you select the Disabled? check box. Enter an expression involving another property, or identify the When Name key part of a when condition rule. Specify one of four outcomes, where true or blank means the URL is disabled.

  • Leave blank to present the URL as disabled always, regardless of the mode of the enclosing layout.
  • When condition rule evaluated once — Enter the When Name key part of a when condition rule that determines the mode of this URL at runtime. The system uses the Applies To key part of the current rule in rule resolution to locate the when condition rule, and executes the when rule once as it renders the form. Click the pencil icon (Pencil) to review or create the when condition rule.
  • Expression evaluated once — Enter an expression that returns true or false. This expression can involve multiple properties, function calls, and other syntax as supported by the <pega:when > JSP tag.
  • Simple Java expression evaluated upon JavaScript events — To dynamically control the mode of this URL with a JavaScript event, enter a simple comparison involving a target property and select the Run on Client? box. The result at runtime determines whether the URL appears as disabled.
    For example, enter .Color =="Red" in this field to disable this URL at runtime when the property Color has the value Red, and enabled otherwise. Depending on the state of the Run on Client? check box, the comparison executes only once as the form is initially displayed, or dynamically. See Implementing dynamic form actions and the Client Event Editor.
Run on Client?

This check box appears only if the Condition field contains a simple Java comparison.

Select to cause dynamic execution of the condition each time the value of the property mentioned in the condition changes. (Mark the field containing that property as a Client Event.) Leave cleared to cause the condition to execute only once, upon initial presentation of the form.

 zzz 3. Complete the Cell Properties panel — Advanced tab

Complete the Advanced tab.

Width

TipAs a best practice, use Smart Layouts to achieve uniform width of cells throughout your application's forms. You can set the width of Smart Layout templates using the Application Skin wizard.

Optional. This field appears only when the cell is not controlled by Smart Layout column restrictions. Enter a positive number for the width in pixels of this cell. (At runtime, normal browser processing for rendering tables determines the actual displayed width.) You can also adjust the width this column directly:

  1. Click a vertical wireframe cell border.
  2. Wait until the pointer shape changes (drag), then drag the border.
Height

TipAs a best practice, use Smart Layouts to achieve uniform height of cells throughout your application's forms. You can set the width of Smart Layout templates using the Application Skin wizard.

Optional. This field appears only when all columns in the Layout are not controlled by Smart Layout column restrictions (that is, all columns have the None template). Enter a positive number for the height in pixels of this cell. (At runtime, normal browser processing for rendering tables determines the actual displayed height.) You can also adjust the height of a row directly:

  1. Click a horizontal wireframe cell border.
  2. Wait until the pointer shape changes (drag), then drag the border.
Privilege

SmartPrompt Optional. Select the Privilege Name key part of a privilege rule that controls the availability of this URL at runtime. During rule resolution at runtime, the system uses the Applies To key part of the current rule as the first key part.

At runtime, the URL is not available to users who do not hold this privilege.

Click the pencil icon (Pencil) to review or create the privilege rule.

Read-Write Style

SmartPrompt Not used.

Read-Only Style

SmartPromptOptional. By default, when the work object form or flow action form appears in read-only mode, the CSS style named LabelValueRead applies. You can enter another style name or select from those listed.

Click the pencil icon (Pencil) to review the text file rule that defines the style sheet. Your application can override the standard style sheet in the text file rule webwb.user_work_form.css.

Use Header Styles

Select to change the style of this value to a table header style (by changing the element from <TD> to <TH>).

Inline Style

To apply inline styling to this cell only, type a CSS style definition in this field, or click the magnifying glass to access a Style Editor window. Styles you enter in this field supplement and override style elements defined in style sheets, according to normal CSS rules.

Inline styles are recorded in the generated HTML for the form; they do not alter the CSS definitions.

Using the Style Editor

You can select the font, color, font size, borders, margins, and other attributes of this cell using selection lists. The Style Editor maintains a preview of the resulting presentation. If you alter the style definition directly, click  Apply   to update the preview.

Click  OK   to record the style defined with the Style Editor in the panel.

 zzz 5. For a Custom type, complete additional information

When you choose CUSTOM as the Type value, the Advanced tab changes. Access and complete additional fields.

When clicked, the custom URL executes an activity, using parameter values determined in this panel or parameter values determined by a user input at runtime.

Field

Description

Do Action

SmartPromptSelect an activity to execute when the URL is clicked. To find the activity at runtime, the system uses the Applies To key part of this rule as the initial Applies To key part of the activity. (For demonstration purposes, the default activity @baseclass.TemplateButtonActivity simply displays harness rule named @baseclass.TemplateButtonDisplay.)

Parameters

If the activity selected accepts input parameters, the sources of parameter values can be set up now, or entered by a user at runtime. To define parameters here, click the magnifying glass button. Enter a constant value, property reference or expression for each parameter.

Label

Description

Pass current parameter page? Select if the parameter page of a calling activity is to be shared with this activity.
(params) If the activity accepts input parameters, enter constant values for each required parameter.
Target

Select one:

  • Current window — The custom activity presents a success message in the current window. To suppress this, the custom activity can call Work-.Show-Harness at the end to redisplay the entire work object form.
  • Pop-up window — The custom activity presents its results in a pop-up window. To suppress all results, choose this option and make the activity return an HTML stream that closes upon load.
  • Custom Frame — The custom activity presents its results in a new frame.
No Data Submission

If you selected Current window for the Target field, select this option to indicate that the custom activity does not require that the current form be submitted to run.

Target Name

If you selected Custom Frame for the Target field, identify the name of the target window or frame.

Window Width

If you selected Pop-up window for the Target field, enter an integer value to determine the initial width of the target window or frame, as a percentage of the entire window width. The default value is 20 percent.

Window Height

If you selected Pop-up window for the Target field, enter an integer value to determine the initial height of the target window or frame, as a percent of the entire height of the window. The default value is 20 percent.

zzz About Flow Action rules

zzz About Harness rules

zzz About Section rules