How to Remove message from the Faces Context
499921Nov 1 2006 — edited Nov 3 2006Hi ,
i want to remove a message that i have added from the FacesContext .
I don't know why , but their isn't appropriate method in the FacesContext.
So how can i do it?
I have tried the following example:
FacesContext ctx = FacesContext.getCurrentInstance();
Iterator iterator = ctx.getMessages();
while (iterator.hasNext()){
iterator.next();
iterator.remove();
}
But, after the execution of the code above , message is still in the FacesContext. It seems that
FacesContext.getMessages() returns pointer to the copy of message list.
Has somebody any idea?