在我的表单中,我需要一键调用两个 servlet。我想调用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" + "')");
}