1 Reply Latest reply on Aug 1, 2012 12:13 PM by Brendan Healey

    rich: notifyMessages

    afifgat tawfiq Newbie

      I use "rich: notifyMessages" to display errors after validation issues,
      but what I need now is to show the same kind of message after an action button, for example, using the "onComplete" tag?
      the messages that i need to display is like this one : "congratulation the operation completed successfully" ... tnx ..

        • 1. Re: rich: notifyMessages
          Brendan Healey Master

          Just do something like this in your action routine:


          FacesMessage message = ...;


          FacesContext.getCurrentInstance().addMessage(null, message);


          I've got all sorts of libraries etc... to build the FacesMessage so you'll need to work this out yourself, the null

          in addMessage above is the client id. As long as you're using a4j ajax components the message appears.