Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Line character in FacesMessage Jsf

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.

like image 540
Muneeswaran Balasubramanian Avatar asked May 18 '11 04:05

Muneeswaran Balasubramanian


2 Answers

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.

like image 104
maple_shaft Avatar answered Sep 22 '22 11:09

maple_shaft


Simply set escape="false" on the <p:messages> component in PrimeFaces 3.3+.

like image 33
Andrew Avatar answered Sep 20 '22 11:09

Andrew