Primefaces remoteCommand不调用Button onSuccess

时间:2017-02-13 12:28:36

标签: jsf remotecommand

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

0 个答案:

没有答案