You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sarma <ss...@mahindrabt.com> on 2006/06/23 11:55:43 UTC

how can i remove message from faces context

Hi , 
how can i remove messages from faces context or any alernative for removing
the messages

i am adding my message like this
FacesContext context = FacesContext.getCurrentInstance(); 
         context.addMessage(null,new
FacesMessage(FacesMessage.SEVERITY_WARN,"Invalid Username or Password","")); 

how can i remove that message
--
View this message in context: http://www.nabble.com/how-can-i-remove-message-from-faces-context-t1835398.html#a5009115
Sent from the MyFaces - Users forum at Nabble.com.


RE: how can i remove message from faces context

Posted by Julian Ray <ju...@yahoo.com>.
Try this

    protected void clearMessages() {
    
    	Iterator iter = getFacesContext().getMessages();
    	while (iter.hasNext()) {
    		iter.remove();
    	}
    }

 

-----Original Message-----
From: sarma [mailto:ssarma@mahindrabt.com] 
Sent: Friday, June 23, 2006 5:56 AM
To: users@myfaces.apache.org
Subject: how can i remove message from faces context


Hi ,
how can i remove messages from faces context or any alernative for removing
the messages

i am adding my message like this
FacesContext context = FacesContext.getCurrentInstance(); 
         context.addMessage(null,new
FacesMessage(FacesMessage.SEVERITY_WARN,"Invalid Username or Password",""));


how can i remove that message
--
View this message in context:
http://www.nabble.com/how-can-i-remove-message-from-faces-context-t1835398.h
tml#a5009115
Sent from the MyFaces - Users forum at Nabble.com.