スピナーを実装する複合コンポーネントを作成しました。うまく動作しますが、primefaces 2.2.1 から primefaces 3.3.1 に変更すると、f:ajax の代わりに p:ajax を使用しようとすると、コンポーネントがすべてのページでクラッシュします。
コンポーネントは次のとおりです。
<c:interface>
<c:attribute name="value" required="true"/>
<c:attribute name="fator" required="false" default="1"/>
<c:attribute name="required" required="false" default="false"/>
<c:attribute name="requiredMessage" required="false" default=""/>
<c:attribute name="validatorMessage" required="false" default="Não é um número válido!"/>
<c:attribute name="disabled" required="false" default="false"/>
<c:attribute name="title" required="false" default=""/>
<c:attribute name="width" required="false" default="100"/>
<c:attribute name="dinheiro" required="false" default="false"/>
<c:attribute name="local" required="false" default="pt-BR"/>
<c:attribute name="imediato" required="false" default="false"/>
<c:attribute name="onchange" required="false" default=""/>
<c:attribute name="onkeyup" required="false" default=""/>
<c:attribute name="max" required="false" default="-1"/>
<c:attribute name="min" required="false" default="0"/>
<c:attribute name="parametro" required="false" default=""/>
<c:attribute name="casasDecimais" required="false" default="2"/>
<c:attribute name="valueChangeListener" method-signature="void method(javax.faces.event.ValueChangeEvent)"
targets="spinner"/>
<c:attribute name="rendered" required="false" default="true"/>
<c:editableValueHolder name="#{cc.id}" targets="spinner"/>
<c:clientBehavior name="blur" default="true" event="blur"
targets="spinner"/>
<c:clientBehavior name="change" default="true" event="change"
targets="spinner"/>
</c:interface>
<c:implementation>
<h:outputStylesheet library="css" name="hrgiSpinner.css" target="head"/>
<h:outputScript library="js" name="jquery.formatCurrency-1.4.0.min.js" target="head"/>
<h:outputScript library="js" name="jquery.formatCurrency.pt-BR.js" target="head"/>
<h:outputScript library="js" name="hrgiSpinner.js" target="head"/>
<h:panelGroup layout="block" styleClass="hrgi-spinner" rendered="#{cc.attrs.rendered}">
<p:inputText id="spinner" value="#{cc.attrs.value}"
styleClass="hrgi-spinner-input editableField" disabled="#{cc.attrs.disabled}"
onchange="formatar(this,'#{cc.attrs.fator}','#{cc.attrs.local}','#{cc.attrs.dinheiro}','#{cc.attrs.max}','#{cc.attrs.min}','#{cc.attrs.casasDecimais}'); #{cc.attrs.onchange}"
required="#{cc.attrs.required}" requiredMessage="#{cc.attrs.requiredMessage}"
validatorMessage="#{cc.attrs.validatorMessage}" onkeyup="#{cc.attrs.onkeyup}"
title="#{cc.attrs.title}" immediate="#{cc.attrs.imediato}" style="width: #{cc.attrs.width}px;"
converterMessage="O valor informado não é um número.">
<f:attribute name="objeto" value="#{cc.attrs.parametro}"/>
</p:inputText>
<h:panelGroup layout="block" styleClass="hrgi-spinner-painel-botoes"
rendered="#{not cc.attrs.disabled}">
<div onmousedown="incrementar('#{cc.clientId}'+':spinner','#{cc.attrs.fator}','#{cc.attrs.local}','#{cc.attrs.dinheiro}','#{cc.attrs.max}','#{cc.attrs.min}','#{cc.attrs.casasDecimais}');"
class="hrgi-spinner-botao hrgi-spinner-botao-alto clearfix"/>
<div onmousedown="decrementar('#{cc.clientId}'+':spinner','#{cc.attrs.fator}','#{cc.attrs.local}','#{cc.attrs.dinheiro}','#{cc.attrs.max}','#{cc.attrs.min}','#{cc.attrs.casasDecimais}');"
class="hrgi-spinner-botao hrgi-spinner-botao-baixo clearfix"/>
</h:panelGroup>
<h:panelGroup layout="block"
styleClass="hrgi-spinner-painel-botoes hrgi-spinner-painel-botoes-desabilitados"
rendered="#{cc.attrs.disabled}">
<div class="hrgi-spinner-botao hrgi-spinner-botao-alto clearfix"/>
<div class="hrgi-spinner-botao hrgi-spinner-botao-baixo clearfix"/>
</h:panelGroup>
</h:panelGroup>
</c:implementation>
f:ajax を使用する場合:
<hrgi:spinner id="aliquotaIpiItem" rendered="#{itemEmbrulhado.carregado}"
disabled="#{not modeloPopupLancamentoNF.lancamentoDanfe}"
value="#{controladorTabelaDinamicaItemNF.recuperarIPI(itemEmbrulhado).aliquota}"
dinheiro="false" fator="0.01" local="pt-BR" min="0.00" width="70"
parametro="#{itemEmbrulhado}">
<f:ajax render=":lancamentoNF:abasNF:painelItensNF :alerta" execute="@form"
event="blur" listener="#{controladorPopupLancamentoNF.validarAliquotasItemEAdicionar}"
onevent="definirFoco"/>
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" locale="#{cc.attrs.local}"
for="aliquotaIpiItem"/>
</hrgi:spinner>
p:ajax を使用する場合:
<hrgi:spinner id="aliquotaIpiItem" rendered="#{itemEmbrulhado.carregado}"
disabled="#{not modeloPopupLancamentoNF.lancamentoDanfe}"
value="#{controladorTabelaDinamicaItemNF.recuperarIPI(itemEmbrulhado).aliquota}"
dinheiro="false" fator="0.01" local="pt-BR" min="0.00" width="70"
parametro="#{itemEmbrulhado}">
<p:ajax update=":lancamentoNF:abasNF:painelItensNF :alerta" process="@form"
event="blur" listener="#{controladorPopupLancamentoNF.validarAliquotasItemEAdicionar(itemEmbrulhado)}"
onsuccess="salvarFoco();" oncomplete="carregarFoco(); exibirPopupAlerta(xhr, status, args);"/>
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" locale="#{cc.attrs.local}"
for="aliquotaIpiItem"/>
</hrgi:spinner>
誰かが私に何が起こっているのか説明できますか??