More about Sections
Pega Platform resolves a reference in a harness to a section during stream processing, by evaluating the<pega: include > JSP tags (or include directives).
For both sections and harnesses, the system generates HTML from information provided in the rule form as it saves the rule form. Note these important differences:
- A harness creates a complete, well-formed HTML document, starting with the <HTML> tag and ending with the </HTML> tag. A section corresponds to a well-formed segment of HTML text, but not an entire HTML document.
- For a harness, you can review but not directly edit the system-generated HTML, accessed from the Advanced tab. For a section, if the Auto-Generated HTML check box in the HTML tab is cleared, you can edit the generated HTML text.
> Linked property references
For fields that are always displayed as read-only, you can enter a linked property reference, of the form .AAAA.BBBB, where AAAA is the linked property and BBBB is any property reference in the object identified by the value of AAAA as a key. For example, if the property AAAA has a value corresponding to a key of a Data-Admin-Operator-ID instance, then .AAAA.pyUserName presents that Operator ID's full name. This allows values from that object to appear (read-only) in the run-time display of the section, although your processing does not explicitly load the object onto the clipboard.
You can view the generated Java code of a rule by clicking. You can use this code to debug your application or to examine how rules are implemented.
> SmartInfo support
Sections support the SmartInfo capability of pop-up windows. When the user holds the mouse pointer over a display element for 700 milliseconds, a pop-up window appears that can supply static or variable information in context. Most SmartInfo pop-up windows are read-only and disappear as soon as a user clicks anywhere outside the window.
By default, SmartInfo pop-up windows disappear when a user clicks anywhere outside the window. To add a close box to the SmartInfo pop-up window and have the pop-up window remain until explicitly closed, include the standard section @baseclass.SmartInfoClickable within the section. (This standard section adds a close box but does not otherwise alter the appearance of the section.)
> Parent class
Through directed inheritance, the immediate parent class of the Rule-HTML-Section class is the Rule-Obj-HTML class.
> Preview and Run
After you save this rule form, click
from the Actions menu or type the equivalent keyboard shortcut
to see a pop-up window presentation of the runtime appearance of the section. (Many sections depend on context. Even when the section is correctly configured, the Preview display may fail and report JSP errors if this section depends on clipboard contents that do not exist or other rules that cannot be found.)
Click Run from the Actions menu to test the section with data from the clipboard.
As with the Design tab, the system renders both the Preview and Run displays using the styles of the skin rule identified in the Using skin preference. If the Using skin field is blank, these displays use the styles marked Work on the Styles tab of the skin identified in your current portal rule.
If your application rulesets contain sections that are not auto-generated, run the Rule Security Analyzer before locking a ruleset Version to look for possible security issues.
Sections are the building blocks of your user interface. You can populate a section with components, such as fields and controls, to create a functional chunk of user interface that can be reused in different contexts for improved consistency and efficient development.
Organize the content and structure of a portal by defining harnesses. By populating harnesses with sections, you can build a modular interface that promotes reuse and maintainability.
- JavaServer Pages tags
- Rule Security Analyzer