0
我有一个确认消息框,当用户点击保存按钮时出现,它只是简单地要求他们确认他们想要保存,但即使全部弹出验证失败,有没有办法,只显示消息框,如果所有的验证是成功的如何停止弹出消息确认验证是否失败
<p>
<p:commandButton value="#{bundle.buttonSaveMark}" icon ="ui-icon-disk" update="displayMark :growl" oncomplete="PF('dlg').show()" />
</p>
<p:dialog header="Confirm Mark" widgetVar="dlg" showEffect="fold" hideEffect="fold">
<h:panelGrid id="displayMark" columns="2" cellpadding="5">
<h:outputText value="Mark to be submitted: " />
<h:outputText value="#{selectedValue}"/>
<p:commandButton id="save"
value="#{bundle.buttonSave}"
actionListener ="#{markingBean.editMark}"
update="Navigation :growl"
icon="ui-icon-disk"
oncomplete="PF('nav').show()"/>
</h:panelGrid>
</p:dialog>
<p:dialog header="Navigation" widgetVar="nav" showEffect="fold" hideEffect="fold">
<h:panelGrid id="Navigation" columns="2" cellpadding="5">
<h:outputText value="Return to this project's marking page: " />
<p:button id="go"
value="#{bundle.buttonProjMark}"
outcome ="/lecturer/marking/marking-index.xhtml?edit_id=#{markingBean.markToEdit.id}"
icon="ui-icon-clipboard"/>
<h:outputText value="Return to staff homepage: " />
<p:button id="staffHome"
value="#{bundle.buttonStaffHome}"
outcome ="/index"
icon="ui-icon-home"/>
</h:panelGrid>
</p:dialog>
是按钮,然后确认
如果此解决方案是适合你的,不是请接受anwser 。所以其他人会知道这是一个封闭的问题。谢谢。 – Tushee