这就是我所拥有的
<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'...
。