Faces keep showing WARN unhandled FacesMessage, besides tr:messages already 
rendered them.
------------------------------------------------------------------------------------------

                 Key: TRINIDAD-2227
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2227
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components, Facelets
    Affects Versions: 2.0.0-core
         Environment: Linux Fedora 15, MySQL 5.x, Apache Geronimo 3.0-Beta-1, 
MyFaces 2.0.9, Trinidad 2.0.0, Using Facelets
            Reporter: Eduardo Garcia


Every time the ManagedBean perform an action such as save, update, delete a row 
in database, a message is created by using a method inside a static class:

public class FacesUtil {

        //...<some more stuff here>

        public static void setMessage(String clientid, String message){
                FacesContext context = FacesContext.getCurrentInstance();
                FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO,
                                "Info.", message);
                context.addMessage(clientid, msg);
                context.renderResponse();
                
        }
}

And the message is created on ManagedBean this way:

        public void doDelete(ActionEvent event) {
                String message = "";
                 //<some method relevants actions here....>
                message = "Record has been deleted";            
                FacesUtil.setMessage(null,message);
        }


The message is rendered as expected, but MyFaces for some reason, doesn't 
notice that, and throws a warning message to console:

2012-02-27 11:02:14,398 WARN  [RenderResponseExecutor] There are some unhandled 
FacesMessages, this means not every FacesMessage had a chance to be rendered.
These unhandled FacesMessages are: 
- Record has been deleted successfully

Thanks in advance,


Eduardo


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to