[
https://issues.apache.org/jira/browse/MYFACES-3631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482480#comment-13482480
]
Leonardo Uribe commented on MYFACES-3631:
-----------------------------------------
I have committed a solution for this one. The idea is reset the state of the
internal variables in javax.faces.context.PartialResponseWriter when
startDocument() is called, to ensure error blocks are written in a consistent
way. Please try it and let us know if it fix the problem.
If no objections, I'll close this issue as fixed soon.
> Malformed Ajax XML Response with duplicated IDs
> -----------------------------------------------
>
> Key: MYFACES-3631
> URL: https://issues.apache.org/jira/browse/MYFACES-3631
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.9, 2.0.15
> Reporter: Michael Moossen
> Assignee: Leonardo Uribe
> Priority: Minor
>
> code to reproduce:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:c="http://java.sun.com/jsp/jstl/core"
> xmlns:rich="http://richfaces.org/rich" >
> <h:head><title>Test</title></h:head>
> <h:body>
> <h1>Test</h1>
> <h:form id="form" >
> <rich:tabPanel switchType="ajax" >
> <rich:tab name="tab1" header="tab1">
> Tab1
> <h:selectBooleanCheckbox value="#{testBean.check}" />
> </rich:tab>
> <rich:tab name="tab2" header="tab2">
> <c:if test="#{testBean.check}">
> <h:inputText id="myId" />
> <h:inputText id="myId" />
> </c:if>
> </rich:tab>
> </rich:tabPanel>
> </h:form>
> <a4j:log />
> </h:body>
> </html>
> {code}
> check the checkbox and change the tab to obtain:
> {code}
> info [16:20:14.159]: Received 'begin' event from <div
> id=form:j_id2114509110_7e08d99f class=rf-tab ...>
> info [16:20:14.213]: Received 'beforedomupdate' event from <div
> id=form:j_id2114509110_7e08d99f class=rf-tab ...>
> info [16:20:14.215]: Server returned responseText: <?xml version="1.0"
> encoding="utf-8"?><partial-response><error><error-name>java.lang.IllegalStateException</error-name><error-message><![CDATA[component
> with duplicate id "form:myId"
> found]]></error-message></error></changes></partial-response>
> error[16:20:14.218]: Received 'error@malformedXML' event from <div
> id=form:j_id2114509110_7e08d99f class=rf-tab ...>
> error[16:20:14.218]: [200] undefined: undefined
> info [16:20:14.220]: Received 'complete' event from <div
> id=form:j_id2114509110_7e08d99f class=rf-tab ...>
> {code}
> I think the problem is somewhere in the
> org.apache.myfaces.shared.context.AjaxExceptionHandlerImpl class but not sure.
--
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