myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus B├╝ttner <buettner.mar...@gmail.com>
Subject Ajax update of a composite component within ui:repeat doesn't work
Date Mon, 16 Apr 2012 14:57:51 GMT
Hi,

This following example works with MyFaces 2.1.6 but not with 2.1.7.

mycc.xhtml:
<cc:interface>
    <cc:attribute name="state" type="ExampleModel.State"/>
</cc:interface>

<cc:implementation>
    <h:selectBooleanCheckbox value="#{cc.attrs.state.state}">
        <f:ajax execute="@this" render="@form"/>
    </h:selectBooleanCheckbox>
    <h:outputText value="State: #{cc.attrs.state.state}"/>
</cc:implementation>


example.xhtml:
<h:form id="form">
    <ui:repeat value="#{example.states}" var="state">
        <my:mycc state="#{state}"/>
    </ui:repeat>
    <my:mycc state="#{example.state}"/>
</h:form>

In debugger I saw the submitted value of the checkbox is set but this state
is overridden a little bit later by
UIRepeate#restoreDescendantComponentStates method which is triggered by
UIRepeat#setIndex which is called by UIRepeat#visitTree.

Any ideas?

Regards,
Marcus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message