![](/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.