html - How user <h:messages> only if not null messages? -


i thinking in use <h:messages> in better way, this:

<h:panelgroup rendered="#{not empty facescontext.getmessages}">   <hr/>   <h3>please inform about:</h3>   <h:messages globalonly="true"  escape="false" /> </h:panelgroup> 

the idea show message user in different way, more style. possible ?

they're available facescontext#getmessagelist() in jsf api , #{facescontext.messagelist} in el.

if you'd check if there messages:

<h:panelgroup ... rendered="#{not empty facescontext.messagelist}"> 

or if you'd check if there global messages:

<h:panelgroup ... rendered="#{not empty facescontext.getmessagelist(null)}"> 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -