确认对话框 Primefaces
..现在我遇到一个问题。
<tabview>
<tab>...
</tab>
<tab>...
</tab>
<tab>...
</tab>
<tab id="p">
<h:form id="qorm">
<h:panelGroup >
<p:commandButton value="Save" actionListener="#{...}" update="priorityDataTable" />
<p:commandButton id="cancelButton" value="Cancel"
onclick="confirmation.show()" type="button" />
</h:panelGroup>
<p:dataTable id="priorityDataTable"
styleClass="priorityDataTable"
selection="#{...selectedJobQueue}"
rowSelectListener="#{...onRowSelect}"
selectionMode="single"
value="#{....priorityList}" var="priority"
>
<p:column>
<f:facet name="header">
Request<br />Number
</f:facet>
<h:outputText value="#{priority.reworkRequest.requestNumber}" />
</p:column>
<p:column>
<f:facet name="header">
#
</f:facet>
<h:outputText value="#" />
</p:column>
<p:column>
<f:facet name="header">
Status
</f:facet>
<h:outputText value="#{priority.priorityStatus.getTextValue()}" />
</p:column>
</p:dataTable>
<h:panelGroup class="queuePriorityActionButton">
<p:commandButton id="moveUpButton" value="Move Up" actionListener="#{....moveUp()}" />
<p:commandButton id="moveDownButton" value="Move Down" actionListener="#{....moveDown()}" />
</h:panelGroup>
</h:form>
<h:form>
<p:confirmDialog message="All updates since your last save will be lost. Are you sure you want to exit?" modal="true"
header="Initiating destroy process" severity="alert" widgetVar="confirmation">
<p:commandButton value="Yes Sure" update="queuePriorityForm:priorityDataTable " oncomplete="confirmation.hide()"
actionListener="{....resetBack()}" />
<p:commandButton value="Not Yet" onclick="confirmation.hide()" type="button" />
</p:confirmDialog>
</h:form>
</tab>
</tabview>
当用户更改表的优先级,并且用户移动请求,然后选择另一个选项卡而不保存请求时。必须显示确认对话框。 所以我不知道该怎么做。任何人都可以帮助我
..Now I come across a question.
<tabview>
<tab>...
</tab>
<tab>...
</tab>
<tab>...
</tab>
<tab id="p">
<h:form id="qorm">
<h:panelGroup >
<p:commandButton value="Save" actionListener="#{...}" update="priorityDataTable" />
<p:commandButton id="cancelButton" value="Cancel"
onclick="confirmation.show()" type="button" />
</h:panelGroup>
<p:dataTable id="priorityDataTable"
styleClass="priorityDataTable"
selection="#{...selectedJobQueue}"
rowSelectListener="#{...onRowSelect}"
selectionMode="single"
value="#{....priorityList}" var="priority"
>
<p:column>
<f:facet name="header">
Request<br />Number
</f:facet>
<h:outputText value="#{priority.reworkRequest.requestNumber}" />
</p:column>
<p:column>
<f:facet name="header">
#
</f:facet>
<h:outputText value="#" />
</p:column>
<p:column>
<f:facet name="header">
Status
</f:facet>
<h:outputText value="#{priority.priorityStatus.getTextValue()}" />
</p:column>
</p:dataTable>
<h:panelGroup class="queuePriorityActionButton">
<p:commandButton id="moveUpButton" value="Move Up" actionListener="#{....moveUp()}" />
<p:commandButton id="moveDownButton" value="Move Down" actionListener="#{....moveDown()}" />
</h:panelGroup>
</h:form>
<h:form>
<p:confirmDialog message="All updates since your last save will be lost. Are you sure you want to exit?" modal="true"
header="Initiating destroy process" severity="alert" widgetVar="confirmation">
<p:commandButton value="Yes Sure" update="queuePriorityForm:priorityDataTable " oncomplete="confirmation.hide()"
actionListener="{....resetBack()}" />
<p:commandButton value="Not Yet" onclick="confirmation.hide()" type="button" />
</p:confirmDialog>
</h:form>
</tab>
</tabview>
when user change the priority of the table, and the user moves a request(s) and then selects another tab without saving the request.Must display a confirmationDialog.
So I don't know how to do it.AnyOne can help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您有什么理由不使用 window.confirm() ? (请参阅http://www.w3schools.com/js/js_popup.asp)
Any reason why you don't use window.confirm() ? (see http://www.w3schools.com/js/js_popup.asp)