cancel
Showing results for 
Search instead for 
Did you mean: 

Display HTML in Web DynPro Java View

Former Member
0 Kudos

Hi,

I have a data in HTML code. It is a full HTML code with the body, head, html.... Now in my Web DynPro i have a section whereby it displayed the message that store in the database table. In that column store all the HTML code. So now in my Web DynPro im using a TextEdit to display the message. It will showed all the HTML code in the TextEdit.

For example


<html>
<head>
</head>
<body>
<p>Testing</p>
</body>
</html>

Is it possible in Web DynPro to display the HTML just like a webpage? As it will convert the HTML code to a readable format.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Adrian,

In case you have formatted text that you wish to be rendered on a Web Dynpro view (but not shown as is) then you should use the FormattedTextView UI element.

Follow these steps:

1. Insert a FormattedTextView element in your view.

2. To define the content of the FormattedTextView, select the text property of your FormattedTextView element and bind the text property to the context attribute which has your HTML content

When the application is run, the HTML will be shown as a web page.

Event onAction is triggered when the user clicks on a link (<a> tag) inside the FormattedTextView. The parameter contains the href attribute of the triggered link.

The TextEdit UI element will not serve your pupose. Hope this helps.

Best Regards,

Supriya

Former Member
0 Kudos

Just found that FormattedTextView UI element is only available in Web DynPro ABAP in NetWeaver 2004s. So I can't use it as I need it in Web DynPro Java.

I found out that can use the IFrame for this. Still searching of how to implement it.

Thanks for you advise.

Former Member
0 Kudos

Hi All,

I'm here to share my finding. I tried with IFrame, it really can work. I'm referring to this article to make it work.

[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2717] [original link is broken] [original link is broken] [original link is broken];

Thanks.