Jsf Primefaces remoteCommand未在成功时调用按钮
在我的表单中,我需要单击一个按钮调用两个servlet。我想在按钮操作成功后调用Jsf Primefaces remoteCommand未在成功时调用按钮,jsf,remotecommand,Jsf,Remotecommand,在我的表单中,我需要单击一个按钮调用两个servlet。我想在按钮操作成功后调用p:remoteCommand。但是远程命令没有调用 XHTML: <p:commandButton value="Confirm" id="esubmit" onsuccess="printBothVoucherDO()" actionListener="#{expenseController.saveExpense}" u
p:remoteCommand
。但是远程命令没有调用
XHTML:
<p:commandButton value="Confirm" id="esubmit" onsuccess="printBothVoucherDO()" actionListener="#{expenseController.saveExpense}"
update="@([id$=submittedVoucherspanel]) @([id$=msgs]) @([id$=expenseForm])"
styleClass="_tab_submit" ></p:commandButton>
<p:remoteCommand name="printBothVoucherDO"
actionListener="#{expenseController.printBothDOVoucher}"></p:remoteCommand>
为什么要将控制逻辑放在视图中?-为什么不在服务器端执行该操作?为什么将控制逻辑放在视图中为什么不在服务器端执行该操作呢?
public void printBothDOVoucher(ActionEvent event) {
TmsUtil.executeOnPage("window.open('PrintVouchers" + "')");
TmsUtil.executeOnPage("window.open('PrintDeliveryOrder" + "')");
}