2 Replies Latest reply on Oct 31, 2007 11:33 AM by Alexey Kakunin

    Rich:messages not working with a4j:region

    Chris Baxter Newbie

      I have a simple page that uses an a4j:region and has rich:messages at the top of the page. The page is as follows:

      <html xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:c="http://java.sun.com/jstl/core">
       <ui:composition>
       <rich:messages layout="list" showDetail="true" showSummary="false">
       <f:facet name="infoMarker">
       <h:graphicImage value="/images/passed.gif" />
       </f:facet>
       <f:facet name="errorMarker">
       <h:graphicImage value="/images/error.gif" />
       </f:facet>
       </rich:messages>
       <h:form id="Test">
       <a4j:region>
       <h:inputText id="Text" value="#{TestBean.text}" required="true"/>
       <a4j:commandButton value="Do Test" action="#{TestBean.doTest}"/>
       </a4j:region>
       </h:form>
       </ui:composition>
      </html>


      If I try to click the 'Do Test' button, I expect to see the rich message display at the top of the page complaining about a missing required field. Instead I see nothing. If I remove the a4j:region, it works just fine. It also works fine if I use h:messages (wrapped in an outputPanel) instead of rich:messages. Is there a reason why rich:messages won't work properly when used with a4j:region?