Question

6
Replies
488
Views
Close popover
Arul Vijay Paulraj (Gooner007)
Tata Consultancy Services

Tata Consultancy Services
IN
Gooner007 Member since 2010 15 posts
Tata Consultancy Services
Posted: February 13, 2017
Last activity: February 15, 2017
Closed

"\n" not working

Hi,

We are having the below code to display the content to the user.

{JAVA}

if (thisValue().length() > 0 && thisRef().hasValidValue())
{
String orgStr = thisValue();
int length = orgStr.length();
String nextlineStr = "\n";

if(length>15)
{
orgStr = orgStr.substring(0,17) + nextlineStr + orgStr.substring(17,orgStr.length());
for (int i=18;i+17<=length; i=i+17)
{
orgStr = orgStr.substring(0,i)+orgStr.substring(i,i+17)+ nextlineStr+ orgStr.substring(i+17,orgStr.length()); }
}

saveValueSet("result", orgStr);
}
else
{
saveValueSet("result", thisValue());
}

{/JAVA}

The Probelm for us is "\n" is not working. Instead of going to the next line it is adding a space. Anyone faced this issue before?

PEGA Version 5.5

Data Integration Java and Activities
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.