入力フィールドでいっぱいのダイナミックデータテーブルを作成しています。場合によっては、ユーザーが一部の入力に値を挿入すると、特定のセルを更新し、このセルのみを更新する必要があります。私はそれが簡単かもしれないと思ったが、それを効かせなかった。 私は更新は、「勇気の合計」であるたいセルときに、2つの他の細胞変化の値が、このセルを更新する必要があります。プライムフェイスの特定のセルを更新する方法dataTable
EDITEDが
私はしました"id:lancamentoNF:popupLancamentoNF:tabelaItensNF:0:valorTotalItemが見つかりません"という完全なIDを持つtryy f:ajaxが見つかりました。 p:ajaxに変更され、エラーは発生しませんが、更新されません!
<h:panelGroup id="painelItensNF" layout="block" styleClass="hrgi-div-form aba-lancamento-nf clearfix" style="overflow:auto;">
<h:panelGroup layout="block" style="width: 1700px;">
<p:dataTable id="tabelaItensNF" value="#{modeloTabelaDinamicaItemNF.itens}" var="itemEmbrulhado" styleClass="tabelaDinamica" height="174" style="width: 100%;" rowIndexVar="indice">
... (some columns)
<p:column style="width: 5%"
headerText="quantidade">
<hrgi:spinner id="quantidadeItem"
value="#{itemEmbrulhado.item.produto.detalheTributavel.quantidade}"
dinheiro="false"
fator="#{itemEmbrulhado.item.produto.detalheTributavel.unidadeFracionada?0.01:1}"
local="pt-BR" min="0.00" width="70">
<p:ajax event="change"
update="lancamentoNF:popupLancamentoNF:tabelaItensNF:#{indice}:valorTotalItem"
listener="#{controladorPopupLancamentoNF.calcularValorTotalItem(itemEmbrulhado)}" global="false" />
<f:convertNumber
maxFractionDigits="#{itemEmbrulhado.item.produto.detalheTributavel.unidadeFracionada?2:0}"
minFractionDigits="#{itemEmbrulhado.item.produto.detalheTributavel.unidadeFracionada?2:0}"
locale="pt-BR"
for="quantidadeItem"/>
</hrgi:spinner>
</p:column>
<p:column style="width: 5%"
headerText="valor unitario">
<hrgi:spinner id="valorUnitarioItem"
value="#{itemEmbrulhado.item.produto.detalheTributavel.valorUnitario}"
dinheiro="true" fator="0.01" local="pt-BR" min="0.00" width="70">
<p:ajax event="change"
update="lancamentoNF:popupLancamentoNF:tabelaItensNF:#{indice}:valorTotalItem"
listener="#{controladorPopupLancamentoNF.calcularValorTotalItem(itemEmbrulhado)}" global="false"/>
<f:convertNumber type="currency" currencyCode="BRL" currencySymbol="R$ "
maxFractionDigits="10" minFractionDigits="2" locale="#{cc.attrs.local}"
for="valorUnitarioItem"/>
</hrgi:spinner>
</p:column>
<p:column style="width: 3%"
headerText="valor total">
<h:outputText id="valorTotalItem" value="#{itemEmbrulhado.item.produto.valorTotal}">
<f:convertNumber type="currency" currencyCode="BRL" currencySymbol="R$ "
maxFractionDigits="2" minFractionDigits="2" locale="pt-BR"
for="valorUnitarioItem"/>
</h:outputText>
</p:column>
... (more columns)
</p:dataTable>
</h:panelGroup>
</h:panelGroup>
それは私がそれはないと思う、私は完全なIDを持つpanelGroup「painelItensNF」を更新したときに動作しますが、フォーカスが失われ、ユーザーは、彼が継続して働いていた入力を見つける必要があります...
によって
を交換してください。 –