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