在布局单元上模态确认拨号(一切都被阻止)

时间:2014-03-04 00:27:57

标签: java javascript jquery primefaces jsf-2.2

嗨evryone我的ConfirmDialog有问题 我使用Primeface 4,当我尝试使用ConfirmDialog不起作用时,小窗口的确认来了,但是它阻止了,不起作用,你不能点击它 这是小代码。 我想在删除之前做一个确认

<h:form prependId="false">

<p:contextMenu for="dataTable">
<p:menuitem value="View" update="display" icon="ui-icon-search"
oncomplete="utilisateur.show()" />
<p:menuitem value="Delete" icon="ui-icon-close"
onclick="confirmation.show()" />
</p:contextMenu>

<p:dataTable id="dataTable" var="user" value="#{usersBean.u}"
paginator="true" rows="10"
rowKey="#{user.idUtilisateur}" 
selection="#{usersBean.selectUser}" selectionMode="single"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="3,5,10,15">
<f:facet name="header">

<p:confirmDialog id="confirmDialog"
message="Are you sure about about deleting this?"
header="Initiating delete process" severity="alert"
widgetVar="confirmation">

<p:commandButton id="confirm" value="Yes Sure" update="dataTable"
oncomplete="confirmation.hide()"
actionListener="#{usersBean.deleteUser}" />
<p:commandButton id="decline" value="Not Yet"
onclick="confirmation.hide()" type="button" />

</p:confirmDialog>

</f:facet>

2 个答案:

答案 0 :(得分:0)

appendToBody="true"

中添加p:confirmDialog

答案 1 :(得分:0)

你尝试修改css风格吗? 我试过这个并且确认对话框工作但它是模态的。

 .ui-widget-overlay{
     visibility: hidden;
 }

也许这也会有所帮助 PrimeFaces commandButton in confirmDialog not calling backing bean