我有一個對話框和兩個命令按鈕。點擊該選項後,對話框不會消失。以下是代碼片段。我正在使用confirmation.hide()
選項。確認後確認對話框沒有消失
<p:confirmDialog
message="Are you sure about deleting the substudyplan?"
id="confirmation"
header="Confirmation Deleting substudyplan" severity="alert"
appendToBody="TRUE" widgetVar="cd">
<p:commandButton value="Yes Sure"
actionListener="#{editBean.deleteSubStudyPlan(selectedRow)}"
update=":studyPlanEditForm"
oncomplete="confirmation.hide()" />
<p:commandButton value="Not Yet" onclick="confirmation.hide();"
type="button" />
</p:confirmDialog>
當你點擊它時,你的'Not Yet'按鈕是否工作?它只是'沒錯'按鈕,不工作? – BestPractices