Show HTML formatting in Oracle ADF

Quick Tip- If you have html content stored in database in string and you want to display same html formatting in ADF.

Use escape attribute in outputText’s escape attribute.You can also try outputFormatted also.In outputFormatted there is no escape property.

     <af:outputText value="&lt;h2>&lt;b>Techartifact&lt;/b>&lt;/h2>" id="ot1"
          <af:outputFormatted value="&lt;h2>&lt;b>Techartifact&lt;/b>&lt;/h2>" id="of1"/>

and output wil be like below


Happy learning with Vinay Kumar in techartifact.


I am an Oracle ACE in Oracle ADF/Webcenter. Sr Java Consultant-working on Java/J2EE/Oracle ADF/Webcenter Portal/ content and Hibernate for several years. I'm an active member of the OTN JDeveloper/Webcenter forum. Passionate about learning new technologies. I am here to share my knowledge. Give your views and suggestion on [email protected] .

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusYouTube