Characters get truncated when using Text Area control
SummaryPost refresh of the Section or Harness, characters entered towards the end gets truncated when using Text Area control configured to accept Minimum or Maximum characters, for example 0 to 20.
The number of characters that get truncated is equal to the number of Enter key press made by the user while entering text (to start a newline).
Error MessagesNot Applicable
Steps to Reproduce1. Create a section rule and configure a Text Area control.
2. Configure a button with Refresh-This Harness.
3. In the Presentation Tab of the control, specify Minimum or Maximum characters, for example 0 to 20.
4. Enter characters in the Text Area control with newlines.
5. Click the button configured in Step 2.
Root CauseThis happens because On harness refresh, new line character is displayed as "\r\n" instead "\n".
Because of this, the string length is calculated as actual length + 1 which causes the characters to be truncated.
ResolutionApply HFix-31984 and perform the following steps:
- After importing the fix, generate the function and library for the below rule:
RULE-UTILITY-FUNCTION PZCONTROL PZGENERATETEXTAREA (Pega-UIEngine 07-10-14)
- Once done, re-save all the sections that have the text control.
Published February 7, 2017 - Updated February 15, 2017