Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Remove message from the Faces Context

499921Nov 1 2006 — edited Nov 3 2006
Hi ,
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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2006
Added on Nov 1 2006
8 comments
4,060 views