HTML in FacesMessage?

Hi Guys,

I want to display bulleted list in the tag caf_h:formattedMessage. Added HTML text to FacesMessage but it rendered the HTML tags as is (as text). Is it possible to render multi line bulleted list using this tag?


this.getFacesContext().addMessage(
							(String) getClientIds().getValue("testID"),
							new FacesMessage(FacesMessage.SEVERITY_ERROR, "Title",
									"<html>List:<ul><li> List item 1;</li><li> List item 2;</li><li> List item 3.</li></ul></html>"));

Kind regards,
Raj

Nope, the message controls always escape the text as rendering arbitrary html in the page can mess up the UI formatting or be a vector for XSS attacks.

1 Like