PrimeFaces: Is there a way to put a hyperlink inside <p:message>

hyperlink, jsf, jsf-2, primefaces

Solution

According to the following blog post : FacesMessage Enhancements

You can use `escape="false"`

<p:message escape="false" />

context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,
    "Sample warn message", "PrimeFaces is developed by 
    <strong>Chuck Norris!</strong>"));

Or

context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,
    "Sample warn message", "Some Link
    <a href='http://www.w3schools.com/'>Visit W3Schools</a>"));

You could also take a look at this article by BalusC

Using HTML in JSF messages

Problem

After a user add an item to the cart successfully, I'd like to display a message like `Click here to continue shopping` and `Click here to view your cart` using `<p:message>` or `<p:growl>`. I tried to google with keywords like PrimeFaces how to put hyperlink into `<p:message>` but nothing meaningful showed up. Hence, I'd be very grateful if you could share with me how to do this or if it's even possible.

Original source