PrimeFaces: is there a way to put hyperlink inside <p: message>
After the user successfully adds the item to the cart, I would like to display a message like Click here to continue shopping
and Click here to view your cart
with <p:message>
or <p:growl>
.
I tried google with keywords like PrimeFaces how to place the hyperlink in <p:message>
, but nothing meaningful came up. So I would be very grateful if you could share with me how to do this or if possible.
source to share
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 can also take a look at this article from BalusC
source to share