Martin Maier created RF-12566:
---------------------------------

             Summary: Calendar: Client-Error on month change because of 
rendering richMessages that are not in DOM
                 Key: RF-12566
                 URL: https://issues.jboss.org/browse/RF-12566
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: component-input
    Affects Versions: 4.2.3.Final
         Environment: Java 7.0.u9, Tomcat 7.0.32, MyFaces 2.1.8, Firefox16/IE9
            Reporter: Martin Maier


The Calendar component causes an client error after receiving the response of a 
Ajax request after changing a month or year.
The error occurs only when there are invisible (not rendered) rich:messages 
that exists in the view (component tree) but are not rendered to the DOM. While 
processing the response the RichMessage-Object can not be process because the 
corresponing DOM element is missing (because it was not rendered).

On other component limitRender="true" would help with this problem but this 
attribute is not available for rich:calendar.

In the example webapp that I attached the Ajax response looks like this:
{code}
<?xml version="1.0" encoding="utf-8"?>
<partial-response>
        <changes>
                <update id="form:messages1"><![CDATA[<span class="rf-msg " 
id="form:messages1"></span>]]></update>
                <update id="form:messages2"><![CDATA[<span class="rf-msg " 
id="form:messages2"></span>]]></update>
                <update 
id="javax.faces.ViewState"><![CDATA[cJRAwt92Bj7eWwztx2b2ZHGkKaccSpVwhIL9tMJ6MhLaVhQjAv7W2YDSQxvk2tqrnjKEEZbDkGQKfvdEKG8UHyQ4YDvS5+bpD7hudnPksj9CzncN83fXTZhyfIPpLQSQqk80lQ==]]></update>
                <extension id="org.richfaces.extension">
                        <complete>
                                new 
RichFaces.ui.Message(&quot;form:messages1&quot;,{&quot;forComponentId&quot;:&quot;form:cal1&quot;,&quot;showSummary&quot;:false,&quot;showDetail&quot;:true});
                                new 
RichFaces.ui.Message(&quot;form:messages2&quot;,{&quot;forComponentId&quot;:&quot;form:cal2&quot;,&quot;showSummary&quot;:false,&quot;showDetail&quot;:true});</complete>
                        <componentData>{&quot;form:cal1&quot;:null} 
</componentData>
                </extension>
        </changes>
</partial-response>
{code}

However, 'form:messages2' was not found in the DOM of the page and causes a
client error. This breaks the functionality of the component because it can not 
update its <componentData> (e.g. data of the datamodel).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to