cancel
Showing results for 
Search instead for 
Did you mean: 

HTML tags for texts

Former Member
0 Kudos

Hello,

I am trying to use some HTML tags for formatting texts in my WD4A application. At design time I can see on the layout tab that the text is indeed formatted (using Label and Caption)

<b>this is a text in a caption</b>

but when I run the application, I see the tags displayed and the text is not formatted anymore

<b>this is a text in a caption</b>

and the question is why.

Does somebody know a trick or have an answer ??

Thanks !!!

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That is because the content of fields is safe encoded. This means that HTML tags are turned back into text.

If you want formatted text, you need to use the FormattedTextView or FormattedTextEdit UI elements. They support a limited number of tags for formatting:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3b/219141c1d0ae5fe10000000a1550b0/frameset.htm

Former Member
0 Kudos

Hi Thomas,

Even with formatted text view/formatted text edit UI element, webdynpro doesn't support all the HTML tags.. Also we have case differences in some of the tags. Ultimately I'm not able to render the HTML text with the formatting.. I checked your thread on iFRAME & its not recommended.. Can you plz let me know if there is any other way to render HTML text in webdynpro.. Is it not possible at all?

Thanks

Geetha

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Correct - the FormattedText UI elements aren't designed for a full range of HTML rendering. Also the iFrame is deprecated on 7.0 and 7.01. It will return to full supported status next year in 7.02.

For now other possible work arounds would be to use the NetWeaver Portal or NetWeaver Business Client. You would create a page with two separate iViews. In one iView you would have the WDA and in the other iView, something that can display HTML - like BSP. You can communicate between the two using Portal Eventing.

Another option if you are on NetWeaver 7.01 is to use FlashIslands. You can't directly display HTML within Flex, but I have an example of using the RichTextEditor in Flex from HTML source. It needs some Flex code to adjust for tags as well, but more formatting is possible than in the FormattedText UI elements.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Do u format the text displayed as text in the screen or

label ?

Thanks,

Divya.S