1 Reply Latest reply on May 8, 2008 3:37 PM by markjstang

    Clear messages after timeout

    vladoseprak

      Hi,

      I have <rich:messages> components on all my jsf pages. When user performs action he is notified by displaying message. But messages stay on the page till user performs other action which refreshes page. I would like to clear displayed messages after certain timeout (e.g 5sec).
      Every suggestion is appreciated.

        • 1. Re: Clear messages after timeout
          markjstang

          I have been wondering the same thing. It occurred to me that if we used the

          <a4j:poll>
          to only be enabled if the messages were there

          #{not empty facesMessages.currentGlobalMessages}


          And then the poll could wipe out the messages. Kind of a one-shot process. More likely we should have a button to "hide" the messages or clear them.

          I think users might be a bit upset if they turn around and when they come back they are gone :-)