users@javaserverfaces.java.net

Inconsistend state Issue with a template including twice

From: Nicolas Labrot <nithril_at_gmail.com>
Date: Fri, 1 Mar 2013 11:55:30 +0100

Hello,

I meet the following issue with Mojarra 2.1.19.

A page includes the same template twice but with different params. User can
hide/show template with a button :
-------------------------------------------
    <h:form>
        <h:commandButton action="#{sessionBean.switch1}" value="switch
panel 1">
            <f:ajax render=":panel"/>
        </h:commandButton>
        <h:commandButton action="#{sessionBean.switch2}" value="switch
panel 2">
            <f:ajax render=":panel"/>
        </h:commandButton>
    </h:form>


    <h:panelGroup id="panel">
        <c:if test="#{sessionBean.render1}">
            <f:subview id="f1">
                <ui:include src="form.xhtml">
                    <ui:param name="comp" value="#{rb1}"/>
                </ui:include>
            </f:subview>
        </c:if>
        <c:if test="#{sessionBean.render2}">
            <f:subview id="f2">
                <ui:include src="form.xhtml">
                    <ui:param name="comp" value="#{rb2}"/>
                </ui:include>
            </f:subview>
        </c:if>
    </h:panelGroup>
-------------------------------------------

rb1 and rb2 are two bean with scope request.
form.xhtml contains a form with a binding :
-------------------------------------------
    <f:subview id="#{comp.name}">
        <h:form id="myForm" binding="#{comp.binding}">

            <h:outputText value="#{comp.name}" id="output"/>
        </h:form>
    </f:subview>
-------------------------------------------

When user clicks on the "switch panel 1", JSF throws a duplicate id
exception. If I remove the binding there is no error. If I duplicate the
included template there is no error.

I'm wondering if it is an already knows issue ?


Thanks!

Nicolas