JSF using EL to test global messages presence
===

I'm trying to display a block only if there are Global messages in the JSF Queue.

I tried to use `rendered="#{not empty facesContext.getMessageList(null)}"`, but it's always evaluated to false.

Only way I found is to create a custom EL function and test it in java.

eg. :
my el function :

    public static boolean isFacesGlobalMessages() {
      return ! FacesContext.getCurrentInstance().getMessageList(null).isEmpty();
    }

JSF page :

    <h:panelGroup class="block1" layout="block" rendered="#{el:isFacesGlobalMessages()}">
      <div class="block-warn-body">
        <rich:messages id="msg" globalOnly="true"/>
      </div>
    </h:panelGroup>



I'm using Mojarra 2.1.5.

Am I missing something ?
Thanks !