0

我正在尝试使用 primefaces mobile 在对话框中添加确认对话框。我试过这些例子

<p:dialog id="main">
<h:form>

    <p:growl id="messages" />

    <p:commandButton value="Delete" onclick="confirmation.show()" type="button"/>

    <p:confirmDialog  message="Are you sure?" header="Confirmation" severity="alert" widgetVar="confirmation">
        <p:commandButton value="Yes" update="messages" oncomplete="confirmation.hide()"
                    actionListener="#{buttonBean.destroyWorld}" />
        <p:commandButton value="Not" onclick="confirmation.hide()" type="button" />
    </p:confirmDialog>

</h:form>
</dialog>

当我呈现页面时,确认对话框不会呈现为对话框,并且还会列出命令按钮。

当我以另一种形式保持确认对话框时,它不会调用对话框。

  1. JSF
  2. JavaScript

我不能让他们中的任何一个工作。我究竟做错了什么?

4

0 回答 0