Table of Contents

Article

Use pyTemplate properties and controls to rapidly prototype work object forms

Summary

When developing the parts of a work object form — harness rules, section rules, and flow actions — you can access three groups of controls to place properties, labels, buttons, and other elements on the form.

In many cases, dropping a control in a cell leaves a placeholder property (.pyTemplateZZZZZ in class @baseclass) on the form. This saves time and allows you to rapidly prototype and preview the layout and look of the form before all the true application properties are defined.

Later, when the properties are known, you can update the Cell Properties panel with the appropriate property name, HTML Property rule (Format), and parameters for the HTML Property rule.

Suggested Approach

The Layout tab of the Harness and Section rule form and the Format tab of the Flow Action form offer an interactive, What-You-See-Is-What-You-Get development facility.

(This article applies to harness, section, and flow action rules in the SmartFrames format. Your system may contain some rules of these three types that do not support the WYSIWYG format: those that do not automatically generate HTML code, and older rules from V4.2 or earlier that are not upgraded. )

Container group

Click the down-arrow in the left group to access five controls in the Container group.

Container Group(The Container control and Tab control are available only for harness rules.)

  1. Drag a control from the list and drop it at an appropriate place on the form. The mouse pointer changes shape when placed over a location where the control can be dropped.
  2. Click the magnifying glass at the upper left of the cell to open the Cell Properties panel. Complete the panel to further define the properties and presentation of the control. Consult Application Developer Help for instructions for each control.

Cell PropertesCompleting a Cell Properties panel

To open the Cell Properties panel, the magnifying glass icon that appears at the upper right of the cell into which you dropped the control.

You can drag this panel to an out-of-the way location on your monitor screen, and optionally "pin" this panel to a fixed location so that it remains open when you click away.

Complete the three tabs of the Cell Property panel. If you are only prototyping the layout and looks of a form, accept the default property names .pyTemplatezzzzzz on the Field tab.

Cell Properties panelIn many cases, the default values on the Cell Properties panel provide a good starting point. The HTML Property rule and its parameter values, together with with the Cell Properties values, determine the runtime behavior.

To review or set parameters for the HTML Property rule, access the Presentation tab and click the magnifying glass to the right of the Format field. The Param window appears.

The Param window allows you to select a different HTML Property rule, or to enter parameter values for the selected HTML Property rule.

 

Params window

After you have entered parameters, click Save to save and close the Params window.

Basic group

1. Click the down arrow in the middle group to access ten controls that can be placed in cells.

Basic (Some of these can be placed in headers. as well as in cells.)

2. As with the Container group, select a control, drag it to the destination cell, and drop it.

3. Open and complete the Cell Properties panel and Format panel as described above.

4. Save the rule form.

Advanced group

1. Click the down arrow in the right group to access eight controls that provide advanced runtime user interface capabilities.

Advanced group

2. Select a control from the list, and drag it to a destination cell, and click the magnifying glass icon to access the Cell Properties panel.

3. Open and complete the Cell Properties panel and Format panel as described above.

4. Save the rule form.

These articles describe two of the Advanced controls:

Preference

If you change a value in the Cell Properties panel but close the panel without clicking Apply, your changes are lost. Through a preference setting, Process Commander can prompt you with a warning message when this occurs.

To review or set this preference:

  1. Select Edit > Preferences from the Developer portal menus
  2. Open the Edit group.
  3. Set the SmartFrames edit Warn on modified preference as you like.

Preference

Tags:

Published December 11, 2007 — Updated March 24, 2008

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.