Reputation: 3989
I wants to display the error message like, "The following headers not avail
1.Name
2.Roll no
How can i show this using faces message in jsf?Please help me.
Upvotes: 8
Views: 15181
Reputation: 1
Simply set escape="false"
on the <p:messages>
component in PrimeFaces 3.3+.
Upvotes: 6
Reputation: 465
Try this one:
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>")
Upvotes: 0
Reputation: 11
you can do it using tag. You need to render this outputText on submit event and then display message in . You have to change escape attribute to false and user tag in you message where you need break. So in above case take one, 2.Roll" escape="false" render="your validation"/>
Upvotes: 0
Reputation: 10463
Without implementing a bizarre hack using javascript and css or without implementing your own JSF messages custom component this is not possible.
You will need to create a new FacesMessage for each line.
Upvotes: 8