jsf中组件的重复ID

时间:2013-11-28 09:57:54

标签: jsf

我有问题。有时候当我按下其中一个按钮时,我得到这个错误“组件mainForm的重复Id:_id251:_id254”。 我做错了什么?

<ui:decorate template="/tags/panelPage.jspx">
<ui:define name="content">
<a4j:region>
....
<a4j:commandButton actionListener="#{pageBean.filter}" id = "filter" 
     rendered="true" 
     reRender="block6include,block7include, block8include, block9include">
</a4j:commandButton>
<a4j:commandButton actionListener="#{pageBean.resetFilter}" id = "reset" 
     rendered="true"
     reRender="block6include, block7include, block8include, block9include">
</a4j:commandButton>

     <!-- BLOCK6-->
     <h:panelGroup id="block6include">    
        <a4j:include viewId="block6.jspx"/>
     </h:panelGroup>
     <!-- /BLOCK6-->

     <!-- BLOCK7 -->
     <h:panelGroup id="block7include">  
        <a4j:include viewId="block7.jspx"/>
     </h:panelGroup>
     <!-- /BLOCK7 -->

     <!-- BLOCK8 -->
     <h:panelGroup id="block8include">
        <a4j:include viewId="block8.jspx"/>
     </h:panelGroup>
     <!-- /BLOCK8-->

     <!-- BLOCK9 -->
     <h:panelGroup id="block9include">
        <a4j:include viewId="block9.jspx"/>
     </h:panelGroup>
     <!-- /BLOCK9-->
...
</ui:define>
</ui:decorate> 
</a4j:region>

“/标记/ panelPage.jspx”

...
<a4j:form id="mainForm" enctype="#{entype}">
...
<ui:insert name="content"/>
...
</a4j:form>

“block6.jspx”

<ui:composition>
<ui:decorate template="/tags/panelBlock.jspx">
<ui:param name="id" value="block61"/>
<ui:define name="content">
...
</ui:define> 
</ui:decorate>

<ui:decorate template="/tags/panelBlock.jspx">
<ui:param name="id" value="block62"/>
<ui:define name="content">
...
</ui:define> 
</ui:decorate>
</ui:composition>

“/标记/ panelBlock.jspx”

<rich:panel  id="#{id}">
...
<ui:insert name="content"/>  
...
</rich:panel>

0 个答案:

没有答案