1 2 Previous Next 15 Replies Latest reply on Nov 6, 2010 4:05 PM by Tom Bryan

    How can I clear facesMessages?

    Karel Jelinek Newbie

      I make some steps in my fuction and inside this function I update some entities. I use home objects for them, so after every update of entity shows predefined message      Successfully updated. If I make 3 changes on 3 entities I have 3 same messages.


      I would like to know, how can I clear all faces messages and show only my own message. I don´t want to override update method of home object.


      I tried this:



      .
      .
      @In private FacesMessages facesMessages;
      .
      .
      
         facesMessages.clear();
         facesMessages.getCurrentGlobalMessages().clear();
         facesMessages.getCurrentMessages().clear();
      .
      .
      
      



      But with no effect.


      Any ideas?

        1 2 Previous Next