I am using Primefaces 2.3.0 and JSF2.0.
I like the html output that Primefaces p:messages
gives me. But I due to existing design, I would like to create the html without needing the to add the messages using FacesContext.getCurrentInstance().addMessage
.
Essentially, I would like to do something like this:
<p:messages value="test"/>
I realize probably would not use p:messages but an existing tags that just outputs something very similar to what p:messages outputs.
I am hoping there is maybe another component that p:messages
is using.
Thanks for any ideas.
The most minimalistic example I've found that looks exactly the same using my theme is:
<div class="ui-message-error">
<span class="ui-message-error-icon"/>
<span class="ui-message-error-detail">test</span>
</div>
I've removed classes ui-widget ui-corner-all
from div, because I don't use rounded corners etc., but if it makes a difference in your case, well, the example would be a bit longer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With