webtier@glassfish.java.net

Nested ui:repeat do not work properly with input components

From: <webtier_at_javadesktop.org>
Date: Wed, 24 Feb 2010 07:40:01 PST

I just posted an issue https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1561.
But like to manifest the problem on the forum too.

Here's the simplest way to reproduce it:


<h:body>
    <h:form id="form">
        <h:commandButton value="Refresh"/>
        <h:commandButton id="fill_button" value="Fill list">
            <f:setPropertyActionListener target="#{viewScope.list}"
value="#{'one'}"/>
        </h:commandButton>
            <h:commandButton id="clear_button" value="Clear list" immediate="false">
     <f:setPropertyActionListener target="#{viewScope.list}" value="#{null}"/>
            </h:commandButton>

        <!-- fake repeat which brokes everything -->
        <ui:repeat var="entity" id="entities" value="#{'entity'}">
            <ui:repeat id="conditions" value="#{viewScope.list}" var="item">
                            <h:outputText value="#{viewScope.list}"/>
                            <h:selectBooleanCheckbox id="neg_checkbox"/>
            </ui:repeat>
        </ui:repeat>
    </h:form>
</h:body>

If one clicks "Fill list" button, checks the checkbox, clears list and fills it again,
the checkbox appears in checked state, unless one removes the outer ui:repeat.
[Message sent by forum member 'nzinoviev' (nikita.zinoviev_at_sun.com)]

http://forums.java.net/jive/thread.jspa?messageID=388456