I'm trying update one dataTable from a graphicImage inside the dataTable. I tried a lot of combination of f:ajax render value but without success, now I'm using p:component function of PrimeFaces, but I get the same error before. I receive this error in browser:
f:ajax contains an unknown id 'j_idt690:painelTabelaAPDespesa' - cannot locate it in the context of the component j_idt735
the code I use to refresh:
<f:ajax event="click" render="#{p:component('painelTabelaAPDespesa')}"
listener="#{itensAPDespesa.removerItem(item)}" />
how you can see this f:ajax is inside a graphicImage that's inside a data table.
<h:panelGroup id="painelTabelaAPDespesa">
<p:dataTable id="tabelaAPDespesa" value="#{itensAPDespesa.itens}"
var="item">
<p:column>
#{itensAPDespesa.itens.indexOf(item)+1}
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Número" />
</f:facet>
<hrgi:editableText style="width:33%"
value="#{item.numeroDocumento}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Vencimento" />
</f:facet>
<hrgi:editableDate style="width:33%" value="#{item.dataVencimento}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Valor" />
</f:facet>
<hrgi:editableCurrency style="width:33%" value="#{item.valor}">
<f:ajax render="@form" event="blur"
listener="#{itensAPDespesa.adicionarItem(item)}"
onevent="mudarFocoParaCampoInexistente(this.id)" />
</hrgi:editableCurrency>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Remover" />
</f:facet>
<h:graphicImage library="img" name="default_trash.png"
style="cursor:pointer;">
<f:ajax event="click" render="#{p:component('painelTabelaAPDespesa')}"
listener="#{itensAPDespesa.removerItem(item)}" />
</h:graphicImage>
</p:column>
</p:dataTable>
<h:outputLabel
value="Total: #{modeloPopupRegistroDespesa.valorTotal}">
<f:convertNumber type="currency" currencyCode="BRL"
currencySymbol="R$" maxFractionDigits="2" minFractionDigits="2" />
</h:outputLabel>
</h:panelGroup>
Probably this is caused because it don't know it is inside the component I want render, so how can I refresh this component (in this case the parent of dataTable)??