이 문제가 발생하여 여기에서 Google의 일부 페이지와 페이지를 검색하고 답을 얻지 못했습니다.p : p : dialog 내의 commandButton이 작동하지 않습니다.
나는 다음과 같은 대화 상자가 :
<!-- Dialog Fechar Pedido -->
<p:dialog header="Fechar Pedido" widgetVar="clsPedido" id="clsPedido" minWidth="550">
<h:form prependId="true" id="frmClsPedido">
<p:panel id="pnlDialogClsPedido" header="Informe a forma de pagamento">
<h:panelGrid id="grdClsPedido" columns="2" cellpadding="5">
<p:outputLabel value="Valor Total:." />
<p:outputLabel value="R$ #{pedidoMB.totalPedido}" size="5" style="color: red;">
<f:convertNumber currencySymbol="R$" integerOnly="true" pattern="#0.00" locale="pt_BR" minFractionDigits="1" minIntegerDigits="1" />
</p:outputLabel>
<p:outputLabel value="Valor Recebido:." />
<pe:inputNumber id="vlrRecebido" value="#{pedidoMB.vlrRecebido}" minValue="0" required="true" onblur="returnValue(this.value)" requiredMessage="Informe o valor recebido!" decimalPlaces="2" decimalSeparator="," thousandSeparator="." />
<p:outputLabel value="Pagamento em:." />
<p:selectOneRadio id="frmPagamento" value="#{pedidoMB.frmPagamento}" onchange="daTroco(this.value);" required="true" requiredMessage="Informe a forma de pagamento!">
<f:selectItem itemLabel="Dinheiro" itemValue="DIN" />
<f:selectItem itemLabel="Débito" itemValue="DEB" />
<f:selectItem itemLabel="Crédito" itemValue="CRED" />
<f:selectItem itemLabel="Vale Refeição" itemValue="REF" />
</p:selectOneRadio>
<p:outputLabel value="Valor Troco:." />
<p:inputText value="#{pedidoMB.vlrTroco}" size="5" style="color: blue;" id="vlrTroco" widgetVar="vlrTroco" readonly="true">
<f:convertNumber currencySymbol="R$" integerOnly="true" pattern="#0.00" locale="pt_BR" minFractionDigits="1" minIntegerDigits="1" />
</p:inputText>
</h:panelGrid>
<h:messages></h:messages>
<div align="right">
<p:commandButton icon="ui-icon-disk" actionListener="#{pedidoMB.doFecharPedido}" />
</div>
</p:panel>
</h:form>
</p:dialog>
을 그리고 난 내의 MBean에서 다음과 같은 방법이 있습니다
public void doFecharPedido(ActionEvent event) {
if (getId() != null) {
Pedido p = getService().findById(getId());
getService().fecharPedido(getVlrRecebido(), getVlrTroco(), p);
}
}
내가 이미 mbean
ActionEvent
을 제거 시도했지만 아무것도 작동하는 것 같다 없습니다.
http://stackoverflow.com/questions/2118656/commandlink-commandbutton-ajax-backing-bean-action-listener-method-not-invoked/2120183을 모두 제외 시켰습니까? – BalusC
문제는 유효성 검사 오류입니다. 어떤 이유로 PF 확장의 inputNumber가 붙여 넣기 값이나 필드의 자동 채우기의 다른 형식을 허용하지 않습니다. –