You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Eduardo Garcia (Created) (JIRA)" <de...@myfaces.apache.org> on 2012/02/27 18:18:48 UTC

[jira] [Created] (TRINIDAD-2227) Faces keep showing WARN unhandled FacesMessage, besides tr:messages already rendered them.

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

        

Re: [jira] [Created] (TRINIDAD-2227) Faces keep showing WARN unhandled FacesMessage, besides tr:messages already rendered them.

Posted by Eduardo <gc...@cibinetonline.com>.
Yes, I'm working on a project since december 2011, and I installed 
Trinidad 2.0.0.  Using MyFaces 2.0.9 (the one which came with Geronimo).

I'm preparing a test case for this.  I will make a try with Tomcat as 
well.  Tonight I expect to send the simple test case with instructions.


Eduardo



On 02/28/2012 08:25 AM, Scott O'Bryan wrote:
> Hmm.  I haven't seen this before.  Eduardo, can you upload a simple
> test case I can run using maven?  May help me to expedite this.  Also,
> just to confirm you are using 2.0.0 and NOT 2.0.1, correct.
>
> Sent from my iPhone
>
> On Feb 27, 2012, at 10:19 AM, "Eduardo Garcia (Created) (JIRA)"
> <de...@myfaces.apache.org>  wrote:
>
>> 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
>>
>>


Re: [jira] [Created] (TRINIDAD-2227) Faces keep showing WARN unhandled FacesMessage, besides tr:messages already rendered them.

Posted by Scott O'Bryan <da...@gmail.com>.
Hmm.  I haven't seen this before.  Eduardo, can you upload a simple
test case I can run using maven?  May help me to expedite this.  Also,
just to confirm you are using 2.0.0 and NOT 2.0.1, correct.

Sent from my iPhone

On Feb 27, 2012, at 10:19 AM, "Eduardo Garcia (Created) (JIRA)"
<de...@myfaces.apache.org> wrote:

> 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
>
>