0 Replies Latest reply on Jan 11, 2012 9:11 AM by richyclarke

    How to prevent rich:notify notification messages appearing on initial page load?

    richyclarke

      Hi,

       

      I am using the rich:notify component from richfaces 4.1

       

      I want to display notification messages to the user as in the showcase page here...

       

      http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=notify&sample=notifyAttributes&skin=blueSky

       

      This component correctly shows a notify message each time it is re-rendered, however it also shows a notify message whenever the page is initially shown.

      I have added the notify component to my template so messages can appear on any page, however it shows on every page load.

      The showcase link above also exhibits this behaviour when loading the page.

       

       

      <a4j:region>

           <rich:notify stayTime="5000" sticky="false" nonblocking="false" showShadow="true" showCloseButton="true"  id="notifications" >

                  <f:facet name="summary">

                      Document Received

                  </f:facet>

                    <f:facet name="detail" >

                   <a4j:outputText value="#{pushBean.message}"/>

                </f:facet>

           </rich:notify>

      </a4j:region>

       

       

      <h:form>

           <a4j:push address="#{pushBean.userIdentifier}@pushCdi" >

                  <a4j:ajax event="dataavailable" render="notifications" />

                </a4j:push>

      </h:form>

       

       

      I only want it to show messages when I re-render it specifically (I am using it in conjunction with a4j:push which re-renders it on the ondataavailable event).

      Does anybody know of a way to stop the rich:notify component showing a notification on initial page load?

       

      Thanks

      Rich