title: Components are with the same id inside ui:repeat
body: <p>Unfortunately, primefaces accordionPanel doesn't works well in version 2.2.1 if you are trying to create tabs dynamically. This is my case, I need to create accordions if the user clicks an add icon, and remove if he clicks on x icon. No problem, I've created my own composite component, like you can see here:</p>
  
  <pre><code>&lt;c:interface&gt;
      &lt;c:attribute name="titulo" default="" required="false" /&gt;
      &lt;c:attribute name="renderizar" default="true" required="false" /&gt;
      &lt;c:attribute name="width" required="false" default="300"/&gt;
      &lt;c:facet name="extra" required="false" /&gt;
  &lt;/c:interface&gt;
  
  &lt;c:implementation&gt;
      &lt;h:outputStylesheet library="css" name="hrgiAccordion.css" target="head" /&gt;
      &lt;h:outputStylesheet library="css" name="clearfix.css" target="head" /&gt;
      &lt;h:outputScript library="js" name="hrgiAccordion.js" target="head" /&gt;
      &lt;h:panelGroup layout="block" rendered="#{cc.attrs.renderizar}"
      styleClass="hrgi-accordion clearfix" style="width: #{cc.attrs.width}px;"&gt;
          &lt;div class="hrgi-cabecalho-accordion clearfix"
              onclick="abrirAccordion(this)"&gt;
              &lt;h:outputLabel value="#{cc.attrs.titulo}" /&gt;
              &lt;c:renderFacet name="extra" required="false"/&gt;
          &lt;/div&gt;
          &lt;h:panelGroup layout="block" class="hrgi-conteudo-accordion clearfix"&gt;
              &lt;c:insertChildren /&gt;
          &lt;/h:panelGroup&gt;
      &lt;/h:panelGroup&gt;
  &lt;/c:implementation&gt;
  </code></pre>
  
  <p>It works fine, but I have some specifics needs... The content of accordion tab is some select and a dynamic table with an inputField and an spinner (created by me again), you can see the user interface here:</p>
  
  <p><img src="https://i.stack.imgur.com/04JUQ.png" alt="Popup forma de pagamento"></p>
  
  <p>When user insert values in spinners, the label "Total das parcelas" should update, but it just updates when the dialog only have one accordion tab! Looking at generated html code I've saw that the spinners in differents accordion tab are equals! Probably this is the reason I can't update values. Here is the code of this dialog:</p>
  
  <pre><code>&lt;ui:composition template="../templates/popupSubmit.xhtml"&gt;
  &lt;ui:param name="titulo" value="#{vendaMsg['popup.forma_pagamento.titulo']}"/&gt;
  &lt;ui:param name="popup" value="#{modeloPopupFormaPagamento}"/&gt;
  &lt;ui:param name="controladorPopup" value="#{controladorPopupFormaPagamento}"/&gt;
  &lt;ui:define name="cabecalho"&gt;
      &lt;h:panelGroup id="cabecalhoValores" binding="#{cabecalhoValores}" layout="block"&gt;
          &lt;h:outputLabel value="#{vendaMsg['popup.forma_pagamento.total_prevenda']}" /&gt;
          &lt;h:outputLabel value="#{preVendaBean.valorLiquido}"&gt;
              &lt;f:convertNumber currencySymbol="R$" maxFractionDigits="2"
                               minFractionDigits="2" type="currency" currencyCode="BRL"/&gt;
          &lt;/h:outputLabel&gt;
          &lt;hrgi:separador/&gt;
          &lt;h:outputLabel value="#{vendaMsg['popup.forma_pagamento.total_parcelas']}" /&gt;
          &lt;h:outputLabel value="#{controladorPopupFormaPagamento.calcularTotalParcelas()}"&gt;
              &lt;f:convertNumber currencySymbol="R$" maxFractionDigits="2"
                               minFractionDigits="2" type="currency" currencyCode="BRL"/&gt;
          &lt;/h:outputLabel&gt;
      &lt;/h:panelGroup&gt;
  &lt;/ui:define&gt;
  &lt;ui:define name="conteudo"&gt;
      &lt;h:panelGroup layout="block" styleClass="clearfix hrgi-div-form"&gt;
          &lt;h:panelGroup id="painelFormasDePagamento" binding="#{painelFormasDePagamento}" layout="block"&gt;
              &lt;ui:repeat id="repeticao" var="formaPagamento" value="#{modeloPopupFormaPagamento.formasDePagamento}"&gt;
                  &lt;hrgi:accordion titulo="#{vendaMsg['popup.forma_pagamento.aba_acordeon.titulo']}" width="380"&gt;
                      &lt;f:facet name="extra"&gt;
                          &lt;p:commandLink action="#{controladorPopupFormaPagamento.removerForma(formaPagamento)}"                                           
                                         update=":#{painelFormasDePagamento.clientId}" global="false"&gt;
                              &lt;h:graphicImage library="img" name="remover.png"/&gt;
                          &lt;/p:commandLink&gt;
                      &lt;/f:facet&gt;
                      &lt;h:panelGroup layout="block" class="clearfix"&gt;
                          &lt;h:panelGroup id="painelSelecaoForma" layout="block"&gt;
                              &lt;h:outputLabel value="#{vendaMsg['popup.forma_pagamento.forma_pagamento']}"/&gt;
                              &lt;h:selectOneMenu value="#{formaPagamento.idFormaPagamento}"                                                                 valueChangeListener="#{controladorPopupFormaPagamento.processarMudancaFormaPagamento}"&gt;
                                  &lt;f:selectItems value="#{selectItemFormasPagamento.itens}"/&gt;
                                  &lt;f:attribute value="#{formaPagamento}" name="formaPagamento"/&gt;
                                  &lt;f:ajax event="change" render="painelSelecaoForma painelParcelasFormaPagamento" execute="painelSelecaoForma"/&gt;
                              &lt;/h:selectOneMenu&gt;
                              &lt;h:outputLabel value="#{vendaMsg['popup.forma_pagamento.plano_pagamento']}"                                       /&gt;
                              &lt;h:selectOneMenu value="#{formaPagamento.idPlanoPagamento}"                                        valueChangeListener="#{controladorPopupFormaPagamento.processarMudancaPlanoPagamento}"&gt;
                                  &lt;f:selectItems value="#{controladorPopupFormaPagamento.recuperarCarregador(formaPagamento).itens}"/&gt;
                                  &lt;f:attribute value="#{formaPagamento}" name="formaPagamento"/&gt;
                                  &lt;f:ajax event="change" render="painelParcelasFormaPagamento"/&gt;
                              &lt;/h:selectOneMenu&gt;
                          &lt;/h:panelGroup&gt;
                          &lt;h:panelGroup id="painelParcelasFormaPagamento" layout="block"&gt;
                              &lt;p:dataTable id="tabela" value="#{formaPagamento.parcelas}" var="parcela"
                                           emptyMessage="#{msgGerais['gerais.sem_dados']}"
                                           scrollable="#{formaPagamento.parcelas.size()&gt;2}"
                                           height="76"&gt;
                                  &lt;p:column headerText="#{vendaMsg['popup.forma_pagamento.tabela.numero_parcela']}"&gt;
                                      &lt;h:outputText value="#{formaPagamento.parcelas.indexOf(parcela)+1}"/&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column headerText="#{vendaMsg['popup.forma_pagamento.tabela.vencimento_parcela']}"&gt;
                                      &lt;hrgi:editableDate value="#{parcela.dataVencimento}" editable="true"/&gt;
                                  &lt;/p:column&gt;
                                  &lt;p:column headerText="#{vendaMsg['popup.forma_pagamento.tabela.valor_parcela']}"&gt;
                                      &lt;hrgi:spinner id="valor"
                                              dinheiro="true" fator="0.01" local="pt-BR"
                                              value="#{parcela.valor}"&gt;
                                          &lt;f:ajax event="change" execute="@form"
                                                  render=":#{cabecalhoValores.clientId}"/&gt;
                                          &lt;f:convertNumber currencySymbol="R$" maxFractionDigits="2"
                                                           minFractionDigits="2" type="currency" currencyCode="BRL"
                                                           for="input"/&gt;
                                      &lt;/hrgi:spinner&gt;
                                  &lt;/p:column&gt;
                              &lt;/p:dataTable&gt;
                          &lt;/h:panelGroup&gt;
                      &lt;/h:panelGroup&gt;
                  &lt;/hrgi:accordion&gt;
              &lt;/ui:repeat&gt;
          &lt;/h:panelGroup&gt;
          &lt;p:commandLink immediate="true" action="#{controladorPopupFormaPagamento.adicionarForma}"
                         update="painelFormasDePagamento" global="false"&gt;
              &lt;h:graphicImage library="img" name="adicionar_48.png"/&gt;
          &lt;/p:commandLink&gt;
      &lt;/h:panelGroup&gt;
  &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>In this image you can see what is happening, component's id inside primefaces datatable aren't appended with ui:repeat index:</p>
  
  <p><img src="https://i.stack.imgur.com/47Thx.png" alt="html inspector"></p>
  
  <p>How can I solve this problem???</p>