Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Format in the Correspondence source is incorrect

SA-84780

Summary



On adding a code in the Correspondence rule source and saving it, the code changes on re-clicking the source button or on check-in. Additional <li> tags display and the format of the source is incorrect. As a result, the page displays incorrectly.


Error Messages



Not Applicable


Steps to Reproduce

  1. Check-out a Correspondence.
  2. Click the Source button and update the code.
  3. Save and re-submit the Source button. The format of the source is incorrect.


Root Cause



A defect in Pegasystems’ code or rules.

The issue occurred due to the Java Server Page (JSP) syntax used.
The Correspondence or Paragraph rule has minimal support for JSP tags, primarily pega:include and pega:reference tags. 
The JSP code caused the issue only at design time on switching between the source and the editor in the Rich Text Editor (RTE). At runtime, this works if the user does not switch between the source and editor during design time.


Resolution



Perform the following local-change:

Use the Scriptlet such that the design time value does not include additional <li> tags.

Note: The limitation with Scriptlet is that the cannot preview in design time. However, at runtime, the changes reflect correctly.

Sample Code:

<pega:foreach name="CGLists.pxResults">
<ol><pega:when name="$this.IsMainDealer==true && $this.BranchOrNot=='Yes'">
 <li style="font-style: normal; font-weight: normal;">test123</li>
 </pega:when>
</ol> 
</pega:foreach>


Scriplet for the sample code:

<ol>
<%
   ClipboardProperty pxResults = tools.findPage("CGLists").getProperty("pxResults");
   Iterator<ClipboardProperty> iterator = pxResults.iterator();
   while(iterator.hasNext()){
      ClipboardProperty prop = iterator.next();
        if(prop.getStringValue("IsMainDealer").equals("true") && prop.getStringValue("BranchOrNot").equals("Yes")){
          tools.appendString("<li style='font-style: normal; font-weight: normal;'>test123</li>");
        }
   }
%>
</ol>

Published September 6, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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