Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jsf output html-formatted text

Tags:

jsf

I have what it seems to be a very trivial question for you jsf expert out there... I'm working in a JSF 2.0 application. Said that I have managed bean with a property containing an html portion to display to the user, which faces control should I use to emit that html directly on the page, without encoding it?

like image 212
themarcuz Avatar asked Nov 03 '11 11:11

themarcuz


1 Answers

Did you try that:

<h:outputText value="#{myBean.myProperty}" escape="false"/>

By default, escape attribute is set to true in order to escape the HTML / XML characters.

like image 90
Romain Linsolas Avatar answered Oct 02 '22 12:10

Romain Linsolas