Skip to main content
LinkedIn
Copied!

Table of Contents

Troubleshooting embedded section issues

Sections are the building blocks of your user interface. You can populate a section with user interface elements, such as fields and controls, to build a modular user interface that promotes reusability and design consistency.

You can include or embed a section inside another section, a layout or a cell in a layout. For example, the repeating dynamic layout (RDL) saves application development time by automating the display of repetitive data records. RDL supports sorting, editable fields, and progressive data load. You can also add an action to an included section. This article describes how embedded sections work and captures the commonly reported questions and issues.

Refresh other section

Implicit section refresh

The following figure helps depict two commonly reported issues related to embedded sections. The figure contains three types of sections:

  • Section A is embedded in two primary sections of the application. Section A is autogenerated. It is editable if its parent section is editable, otherwise it is read-only.
  • Section B is read-only.
  • Section C is editable.
Example of embedded section reused in read-only and editable parent sections.
"Section A is reused and embedded in editable Section C and read-only Section B"
Example of embedded section reused in read-only and editable parent sections.

Refresh other section

Symptom

Refresh-Other Section action changes a read-only section to an editable section.

Explanation

A section is included twice in a single harness: once as an editable section, the other time as a read-only section. One of the actions in the editable section is Refresh-Other Section that refreshes the included section (same section which is included twice). After refresh, the read-only section turns editable.
However, on that same Refresh-Other Section action, Section A embedded in Section B, which is read-only, turns editable, even though its parent section (Section B) is read-only. 

Solution: Local change

Specify a control to selectively refresh only the parent section instead of refreshing an embedded, child section. In the example shown in the figure, specify a control in Section C to refresh only Section C (the parent section) instead of refreshing Section A (the embedded section).

Implicit section refresh

Symptom

A section containing a repeating dynamic layout (RDL) is embedded in a read-only section.
When a Delete Item action is invoked on an RDL field, the section refreshes and turns editable. However, since the section is embedded in a read-only section, it must persist as read-only.

Explanation

Pega-provided actions such as Delete Item and Refresh row cause implicit refreshing (reloading) of sections.
In the example figure, if Section A contains a repeating dynamic layout (RDL) with a Delete button for a row of the RDL, on click of the Delete button triggers the Delete Item action on the RDL row. The Delete Item action implicitly causes Reload Section on Section A, making Section A editable, even though it is embedded in read-only Section B.

Solution: Local change

Add a non-auto-generated section (Section D extending the example of the figure) as a wrapper for Section A. Include Section D inside Section B. In the HTML fragment of Section D, add the following code:

<%   

String existingROFlag =  tools.getParamValue("SectionReadOnly");   

/* OverRide ROFlag as readonly always */   

tools.putParamValue("SectionReadOnly","-1");

%>

<%   

/* Reset RO flag to previous state*/   

tools.putParamValue("SectionReadOnly",existingROFlag);

%>

Did you find this content helpful?

100% found this useful


Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us