Back Forward Control form
Completing the HTML tab

  1. About
  2. New
  3. Control
  4. HTML
  5. Parameters
  6. Pages & Classes
  7. History
  1. More...

For non-auto-generated controls, you can enter HTML source directly into the HTML Source text area. Alternatively, click the pencil icon (Pencil) to open your HTML editor.

SR-2666 B-18786 No Save prompt

Field

Description

Omit extra Spaces?

Select to eliminate extra space characters in the processed HTML. This can make transmission or processing more efficient. Is does not alter the appearance of the HTML when displayed in a browser.

When selected, during stream processing the system:

  • Deletes control characters such as tab and newline.
  • Replaces two or more consecutive space characters with a single space, except within the curly brace characters defining directives.

Stream processing always copies space characters within the text of a property value, non-breaking spaces ( ) and space characters within a literal directive into the processed HTML without change.

Property Type Optional. If this control rule is a likely choice for presenting a field on a work object form or flow action form, you can select a type or ALL in this field.

Your choice helps a developer — while working on a harness, section, or flow action rule — select an alternate HTML format for a property that is best suited to the application need. This value acts only as a filter; it does not prevent this control rule from being referenced by any property rule. (The Double type is not an option for this field.) SO WHAT DO YOU DO to present a DOUBLE?

If not blank, the name and two previews (read-write mode and read-only) of this control rule appear on the pop-up list accessed by the magnifying glass button (magnifying glass) on the Cell Properties panel, for Harness, Section, and Flow Action forms (in the SmartFrames format). For example, if the property type is a Date, DateTime, or TimeOfDay see Harness, Section, and Flow Action forms— Adding a Date control. MELLJ 5/25/05 Q-2176

Advanced featureThis field is intentionally blank on few standard control rules including AutoComplete, ListToList, and Chart that are never intended to be associated with a single property on the Property form. These special control rules support advanced features available from the Layout tabs of the Harness and Section form and the Format tab of the Flow Action form.

Display Optional. If this Control rule is a likely choice for presenting a field on a work object form or flow action form, you can select a format here. Your choice helps a developer — while working on a harness, section, or flow action rule — select an alternate HTML format for a property that is best suited to the application need. This acts only as a filter; it does not prevent this Control rule from being referenced by any property rule:
  • Select Input Field if the field is likely to be presented by an HTML element <INPUT TYPE = "INPUT" ...>
  • Similarly, select Select if the field can be represented by an HTML selection list, corresponding to the element <HTML INPUT TYPE="SELECT" ...>
  • Select Radio Button or Text Area if the corresponding HTML elements are likely to apply.

If not blank, the name of this Control rule appears on the pop-up lists accessed by the magnifying glass on the Field panel, for Harness, Section, and Flow Action forms (in the SmartFrames format only). Q-2176 MELLJ 5/25/05

INPUT element

When you use an INPUT element for a text box, checkbox, selection box or text area in the HTML text of a Control rule, use this JSP syntax: ERNSG 3/13/06 B-18347

<INPUT name=""<pega:reference name=""$this-name"" />""

(When using directives, you can omit the NAME attribute and its value. The system determines the NAME and value from the property rule that references your Control rule.)

Auto-generated?

V6.1 sp2 proj428When selected, Process Commander generates HTML text for the control based on settings in the Control tab. Standard Process Commander auto-generated rules have this checkbox selected by default. If you deselect this checkbox, the system conceals the Control tab and displays the Parameters tab.

Do not deselect this checkbox in auto-generated rule forms. Doing so disables access to the Parameters dialog from the Control Cell properties panel in a section or harness.

It is a best practice to create new controls as auto-generated. Deselect this checkbox. When developing non-auto-generated controls, avoid hand-edited HTML when other approaches can achieve the same result. As a best practice, use the Rule Security Analyzer to detect and correct for security vulnerabilities.

Generate For Typically, the system sets this field to HTML or JSP, to indicate whether the HTML source is to contain HTML directives or JSP tags. For new control rules, the initial value is JSP. R-18933

Tip Use of JSP tags in control rules offers superior performance and other advantages over directives. Although both directives and JSP tags are supported, JSP tags are recommended for new development.

Control rules that accept parameters must use JSP tags.

NoteIf this rule is circumstance-qualified or time-qualified, make this Generate For value match the Generate For value of the base rule. The base rule and the qualified rules must all use JSP tags or all use directives. B-20380

NoteDo not save the rule form if you have composed HTML that contains both JSP tags and directives.

Browser Support SmartPrompt5.4 PROJ-954 Indicate which browsers and versions can display the JSP or HTML from this rule. Process Commander does not validate your code. You must ensure that your code can be displayed in the supported browsers, which include Internet Explorer 6+, Firefox 3.5+, Safari 4+, and Chrome 5+. 6.2 The value is read-only.6.1

The Browser Compatibility Report in the Application Preflight tool checks this value to determine what percentage of the rules in your application provides cross-browser support.

Accessibility

SmartPromptSelect On to indicate that you have designed and implemented your HTML to meet your accessibility requirements.

NoteThe Application Preflight tool evaluates this field on each rule in an application that displays it, when calculating application accessibility levels for the preflight Accessibility Report. See Using the Application Preflight tool.PROJ-901 5.4

HTML Source

Non-auto-generated controls only. Enter the HTML, script, or CSS text. The text can include JSP tags or directives, but not both.

If this control rule is to support parameters entered on the Parameters tab, use only JSP tags and set the Generate For field to JSP. C-2281 C-2282

JavaServer Page tags

Tip Use of JSP tags in control rules offers superior performance and other advantages over directives. Although both directives and JSP tags are supported, JSP tags are recommended for new development. Conversion of existing Control rules that use directives to functionally equivalent rules that use JSP tags is straightforward.

Inline Java and access to parameter values

Use the <% and %> delimiters to insert inline Java code (a scriptlet) in the HTML. Within the code, use Java syntax similar to the following to obtain the runtime value of a parameter from the parameter page, where MyType is defined on the Parameters tab):

<%
String MyTypeParam = tools.getParamValue("MyType")
...
%>

For additional examples, review the Java code in the standard control rule named Decimal.

Including JavaScript function definitions

See More about Control rules.

Tips

TipUse the <pega:when > JSP tag to conditionalize the HTML for a property based on the mode (display or read-only mode versus read-write mode).or equivalently the When directive

To detect review mode, use:

<pega:when test="!$mode-input">
   <!-- display stuff here -->
</pega:when >

Useful JSP tags

These tags are used often. Don't forget to include the closing elements.

JSP tag

Result

<pega:when test="!$mode-input"> ...
</pega:when>

Read-only mode.

<pega:when test="$this:isBad">
...
</pega:when>

Error on this element.

<pega:reference
    name="$this-value" />

Value of the active property.

Example

This example causes the output HTML to display a read-only value if the property value appears in read-only mode, or a select box with three choices if the property appears in read-write mode.

<pega:when test="$mode-display" >
   <pega:reference name="$this-value" />
</pega:when>
<pega:when test="mode-input" >
<SELECT >
   <OPTION VALUE="Best">Best</OPTION>
   <OPTION VALUE="Replaced">Replaced</OPTION>
   <OPTION VALUE="Obsolete">Obsolete</OPTION>
</SELECT>
</pega:when >

Up About Control rules