cancel
Showing results for 
Search instead for 
Did you mean: 

Newline in formattedtextview

Former Member
0 Kudos

Hi,

I have a formattedtextview UI element that I want to fill with certain values at runtime.

All these values should be on different lines . How do I use the new line character to achieve this.

I tried to append these values in a String (displayText) and used \n for new line. I then converted this to formatted text using:

IWDFormattedTextFactory instance =

(IWDFormattedTextFactory) WDHelperFactory.getInstance(IWDFormattedTextFactory.class);

String value = displayText;;

IWDFormattedText formtext = instance.fromPlainText(value);

wdContext.currentContextElement().setFoTxt(displayText);

This however does not work.The data comes on one line

Can someone suggest.

TIA.

Regards,

Himanshu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Use +"\n" in the string it will split into new line

Former Member
0 Kudos

Hi Rakesh,

\n does not work for formattedtextview UI.

Regards,

Himanshu

Former Member
0 Kudos

Sorted....

We need to use

IWDFormattedText valueOf(String text)

and not

IWDFormattedText fromPlainText(String text)

Instead of "\n" use "<br></br>"

Regards