![](/img/trans.png)
[英]How to make a4j:commandLink execute action and show modalpanel?
[英]Action of a4j:commandLink not fire after modalPanel close
我想在單擊commandLink之后調用該操作,然后選擇ok確認並在commandlink中觸發該操作。 但我只能打開一個modalPanel並關閉它。 但是在a4j:commandLink中沒有調用該操作。 我可以問一下,在選擇modalPanel的“OK”之后我怎么能解雇這個動作?
<a4j:commandLink
action="#{confManager.deleteValue(deleteValue)}"
onclick="#{rich:component('confirmation')}.show();return false"
value="#{messages.deleteLabel}"
title="#{messages.deleteHint}"
propagation="none"
reRender="systemPropertiesTable">
</a4j:commandLink>
<rich:modalPanel id="confirmation" width="210" height="100">
<f:facet name="header">#{messages.systemPropertyConfirmDialogHeader}
</f:facet>
<h:panelGrid>
<h:panelGrid columns="2">
<p><h:outputText value="#{messages.systemPropertyConfirmDialogContent}" /></p>
</h:panelGrid>
<h:panelGroup>
<input type="button" value="OK"
onclick="#{rich:component('confirmation')}.hide();submit();return false" />
<input type="button" value="Cancel"
onclick="#{rich:component('confirmation')}.hide();return false" />
</h:panelGroup>
</h:panelGrid>
</rich:modalPanel>
您是否嘗試將OK按鈕轉換為a4j:commandButton並在OK按鈕上移動操作?
您可以使用actionListener在bean中保存“deleteValue”,並在用戶單擊“確定”時有效刪除它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.