1 Reply Latest reply on Dec 2, 2008 12:51 PM by jamesjmp

    Hiding Default Faces Messages for Persist Method

    rmuruga
      Hi There,
          I have a class to insert a record which inherits EntityHome<User>  when i call the persist method ,the records are getting inserted without any problem, but the default faces messages "Successfully Created" is appearing and iam not able to display my own messages.

      Please suggest me how to remove that,

      Thanks In Advance

      Muruga.R
        • 1. Re: Hiding Default Faces Messages for Persist Method

          Hi Muruga:
          In your class POJOHome class override getCreatedMessage method this way:



          @Override    
          public String getCreatedMessage()
          {
              return "your message";
          }
          



          That is called when persistance has been done successfully.


          If you don´t want any message to be displayed just return an empty String value.


          By the way, there are two more messages that perhaps you would like to override as well: getUpdatedMessage and a getDeletedMessage.