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