<f:ajax>重新加载兄弟<ui:repeat> </ui:repeat> </f:ajax>

时间:2014-07-28 16:38:33

标签: ajax jsf uirepeat

这就是我所拥有的

<h:body>
            <ui:repeat id="repeatBlockId" var="dataItem" value="#{backingBean.dataList}">

                <custom:myComp id="myCompId" name="#{dataItem.name}"/>

            </ui:repeat>
    </h:body>

这里是复合组件

<composite:implementation xmlns:custom="http://java.sun.com/jsf/composite/components">

        <ui:param name="name" value="#{cc.attributes.name}"/>

        <h:panelGroup id="toBeRefreshedId">
        #{backingBean.randomNumber}
        </h:panelGroup>    

        <h:form id="myFormId">
                <br/>#{name}
                <h:commandButton>Refresh
                    <f:ajax render=":#{cc.clientId}:toBeRefreshedId" />
                </h:commandButton>
            </h:form>

    </composite:implementation>

无论我尝试什么,我都没有完成更新表单的兄弟。我总是收到以下错误消息:

<f:ajax> contains an unknown id ':repeatBlockId:0:myCompId:toBeRefreshedId' - cannot locate it in the context of the component j_idt6

我还尝试使用<f:ajax render=":#{cc.clientId}" />简单刷新整个复合块,从而产生相同的错误消息...unknown id ':repeatBlockId:0:myCompId'...

0 个答案:

没有答案