New line symbol in FacesMessage Jsf

I want to display an error message, for example, "The following headers are not used

1.Name 2.Roll no 

How can I show this using face messages in jsf? Please help me.

+7
source share
4 answers

This is not possible without introducing a fancy hack using javascript and css, or without implementing your own custom JSF message component.

You will need to create a new FacesMessage for each row.

+7
source

you can do this with a tag. You need to display this Text output on the sending event, and then display the message. You must change the escape attribute to false and the user tag in the message where you need a break. So, in the above case, take one, 2.Roll "escape =" false "render =" your check "/">

0
source

Try the following:

 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>") 
0
source

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

0
source

All Articles