cancel
Showing results for 
Search instead for 
Did you mean: 

new line in textview

Former Member
0 Kudos

Hi all,

I use textview ui element to show message(String).The attribute attached to this element is populated dynamically in code. I use new line character (\n) to move text to next line .This worked fine for me in earlier versions (SPS15).

Now that the systems are upgraded to SPS19.The text shows up in a single line.The new line is totally ignored.

Any faced similar issues or anybody know the way out pls post here..

Many Thanks,

Ashok.

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Used /n/r

former_member1
Active Participant
0 Kudos

Hi,

I dont think \n is recognized in Text View.

if you want to display formatted text then you should use Inline Frames

Regards,

Anish

Former Member
0 Kudos

No, "\n" inside a string should be rendered as a new line, everything else is a bug.

Armin

Former Member
0 Kudos

Hai,

This may help you

/people/valery.silaev/blog/2005/11/23/display-formatted-text-using-webdynpro-for-java

regards,

Naga

Former Member
0 Kudos

Hi Ashok,

i have tried it out. The \n still works.

I created a string variable "str" as follows:

String str = "Hello" + '\n' + "How are you"

I passed this value to a context variable which was mapped to a textview UI.

The textview displayed the message on as follows:

Hello

How are you

Please try it again, in this fashion.

Regards,

Hanoz

Former Member
0 Kudos

Open an OSS message (BC-WD-CLT-HTML).

Armin

Former Member
0 Kudos

Hi Armin,

can you please throw some more light on this issue.

you mean in sps19 this cannot be achieved at all?

Many Thanks,

Ashok

Former Member
0 Kudos

Ashok,

This means that it is probably a bug in SP19 (regression)

If this is in fact true, you can't use functionality untill necessary patch will be released.

Btw, old versions of WD didn't have such functionality, common workaround was to use dynamic context/ui programming, split string up to lines and create as many attributes/TextView-s dynamically as number of lines. Every TextView shows single line.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Message was edited by:

Valery Silaev

Former Member
0 Kudos

I did not verify that this is a bug in SP19, but from your description it might be.

Armin

Former Member
0 Kudos

I've changed wording accordingly.

former_member197348
Active Contributor
0 Kudos

Hi Ashok,

set the layout width property = 'Npx' , where N is size of the line in pixels.

But for this, you need set the parent container layout property to 'Grid Layout'.

regards,

Siva

Former Member
0 Kudos

Hi,

Thanks for the immediate replies.

I do not need a fixed size text box and provide wrapping to move to the next line where the size ends.

Here I need to have logical breaks to a new line in code.So I use the new line character wherever required.

Many Thanks,

Ashok

former_member197348
Active Contributor
0 Kudos

Hi,

Then use TextEdit UIElement in disabled mode. Use a String variable and set it to textEdit Element. I am not sure whether it works for TextView also.

regards,

Siva

Former Member
0 Kudos

Hi,

Have you tried setting the "<i>Wrapping</i>" property of the "<i>TextView</i>" UI element to true?

Regards,

Satyajit.