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
- Check-out a Correspondence.
- Click the Source button and update the code.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.