-1

I need to add a Html content when some method returns the wanted result (any method, any result) to the JSF page exactly like primefaces do with .

Html to add is simple :

<div class="alert alert-success" role="alert">
                    <strong>Well done!</strong> You successfully read this important alert message.
                </div>

But can't find a way to do this cleanly, I've read many posts like How do I return HTML from managed bean in JSF? but my bean need to insert that html when user is doing something e.g. submitting a form result.

Also : is there a way to save it and show it in case of a redirection like it is with primefaces context.getExternalContext().getFlash().setKeepMessages(true);

Community
  • 1
  • 1
Chaibi Alaa
  • 1,346
  • 4
  • 25
  • 54

1 Answers1

1

Why not simply using h:messages tag ? It is fully customizable in terms of design and you can simply affect your styles and class without all the turn-around

Source : http://www.jsftoolbox.com/documentation/help/12-TagReference/html/h_messages.html