Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3631

Malformed Ajax XML Response with duplicated IDs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.9, 2.0.15
    • Fix Version/s: 2.0.16, 2.1.10
    • Component/s: General
    • Labels:
      None

      Description

      code to reproduce:

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

      check the checkbox and change the tab to obtain:

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

      I think the problem is somewhere in the org.apache.myfaces.shared.context.AjaxExceptionHandlerImpl class but not sure.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lu4242 Leonardo Uribe
                Reporter:
                mmoossen Michael Moossen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: