Jsf output html formatted text

I have what seems like a very trivial question for you, the jsf expert is there ... I am working in a JSF 2.0 application. Said I was managing a bean with a property containing the html part to display to the user who is faced with the control, should I use to emit this html directly on the page without encoding it?

+6
source share
1 answer

You tried this:

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

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

+22
source

Source: https://habr.com/ru/post/900686/


All Articles