2 Replies Latest reply on Dec 19, 2007 12:30 PM by balteo

    I am having problems with rich:messages usage

    balteo

      Hello,
      I have the following page and I am having the following problem: when I call the action="#{RevaluationManagedBean.copyFromRevaluation}" action and when a problem occurs a rich:message is displayed briefly and then the a4j:poll causes the rich:messages to disappear. How can I make sure the rich:message output is displayed until the next button click?
      Thanks in advance,
      J.

       <f:view>
       <a4j:outputPanel id="main-panel">
       <h:panelGrid columns="2" border="0" width="100%" styleClass="header" id="page-header">
       <h:graphicImage value="images/calfi.gif"/>
       <h:panelGroup>
       <h:outputText value="Application"/>
       <h:outputText value="Centralisation des Risques" style="color: #990000; font-weight: normal;"/>
       </h:panelGroup>
       </h:panelGrid>
      
       <f:verbatim>
       <br/><br/><br/><br/>
       </f:verbatim>
      
       <f:verbatim>
       <div id="navcontainer">
       <ul id="navlist">
       <li id="active"><a href="#" id="current">Traitement Réévaluation</a></li>
       <li><a accesskey=""href="corporate.jsf">Traitement Entreprises</a></li>
       <li><a accesskey=""href="statement.jsf">Traitement Déclaration</a></li>
       <li><a accesskey=""href="exports.jsf">Exports des données</a></li>
       </ul>
       </div>
       </f:verbatim>
      
       <f:verbatim>
       <br/><br/><br/><br/>
       </f:verbatim>
      
      
       <h:form>
       <a4j:poll id="poll" interval="5000" reRender="nombre-de-lignes"/>
       <h:outputText id="nombre-de-lignes-label" value="La table de réévaluation contient: "/>
       <h:outputText id="nombre-de-lignes" value="#{RevaluationManagedBean.rowCount} lignes" style="color: green;font-weight: bold;"/>
       </h:form>
      
       <f:verbatim>
       <br/><br/>
       </f:verbatim>
      
       <h:form>
       <a4j:region id="revaluation-process">
       <h:panelGrid columns="2">
       <rich:messages showDetail="true" showSummary="true" keepTransient="false" ajaxRendered="false"/>
       <h:panelGroup/>
       <a4j:commandButton id="copy-from-revaluation-button" action="#{RevaluationManagedBean.copyFromRevaluation}" value="Lancer la récupération des données de la réévaluation" reRender="revaluation-process-status"/>
       <a4j:status id="revaluation-process-status" for="revaluation-process">
       <f:facet name="start">
       <h:graphicImage value="images/start.gif"/>
       </f:facet>
       <f:facet name="stop">
       <h:graphicImage value="images/stop.gif"/>
       </f:facet>
       </a4j:status>
       <a4j:commandButton id="empty-revaluation-table-button" action="#{RevaluationManagedBean.emptyRevaluationTable}" value="Réinitialiser les données afin de relancer la récupération des données de la réévaluation"/>
       <h:panelGroup/>
       </h:panelGrid>
       </a4j:region>
       </h:form>
      
       <f:verbatim>
       <br/><br/>
       </f:verbatim>
      
       </a4j:outputPanel>
       </f:view>