cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying HTML Code

Former Member
0 Kudos

Hi,

is it possible to display HTML in a webdynpro application (without using iframe), e.g. I read HTML from database

<b>bold text</b>

then

bold text should displayed in my WD4A.

Best Regards,

Marcel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Marcel,

It's possible using the FormattedTextView.

[http://help.sap.com/saphelp_nw04s/helpdata/en/08/5696420cc2c56ae10000000a155106/frameset.htm]

Regards.

Former Member
0 Kudos

Hi David,

thank for your answer, but it seems to be that not all tags are supported. I try to use an opensource html editor. For this requirement I could use an iframe, but I want that the the entered text is binded to the context so that I can write it back into the MIME repository. Maybe you have further suggestions how to do that.

Thanks in advance and best regards,

Marcel

Former Member
0 Kudos

Hi Marcel,

I think iFrame UI element should not be used anymore, but nevertheless, since iFrame seems to be the alternative for you at the moment, here is what you can do.

First of all, are you creating the iFrame dynamically? Or are you creating it in the layout itself? iFrame has a property - 'source'. You need to create a context node with an attribute of type STRING. You can bind this attribute to the 'source' property of the iFrame. If you are creating it in the layout as an UI element, directly bind it to the 'source' property of the iFrame UI element. If you are dynamically creating it, then use the BIND_SOURCE method of class CL_WD_IFRAME to define the binding.

You could also refer to the [WDP documentation|http://help.sap.com/saphelp_nw70/helpdata/EN/15/c07941601b1d09e10000000a155106/frameset.htm].

I hope I understood your problem correctly, and was able to provide some insight on the solution.

Regards,

Wenonah

Former Member
0 Kudos

Hello Marcel,

I do not see another option than iFrame.

Formated text view is very limited. I noticed its just working for simple text style, like <br>, <ul>. But nothing like font etc.

Former Member
0 Kudos

Hi all,

thanks for the answers. It seems that I must look for another solution.

Best Regards,

Marcel

steffen_weber
Employee
Employee
0 Kudos

Hi all,

I'm facing the same problem of how to present HTML code in a AWD application.

Unfortunately, it seems that an iFrame UI element can't display string context like "<html><body>Hello</body></html>", it prompts that the tag <html> is not allowed.

But doesn't the iFrame should display code like this?

Regards, Steffen

Former Member
0 Kudos

Hi Steffen,

in an iFrame you can only display HTML pages via URL. But SAP no longer recommends to use iFrames.

At the moment there is no way to display HTML coding in WD4A, but you can use BSP pages for displaying HTML codes.

The SAP product management told me that a HTML editor is planned for the next ABAP releases and also code completion and other nice features.

Best Regards,

Marcel

Answers (0)