更新时间:2022-06-13 23:15:58
您需要使用 event="action"
而不是 event="click"
.你甚至可以完全省略它.这是
在嵌套在 UICommand
组件中时监听的默认事件.
You need to use event="action"
instead of event="click"
. You could even omit it altogether. It's namely the default event the <f:ajax>
is listening on when nested in an UICommand
component.
<h:commandLink action="#{testBean.showSomething}">
<f:ajax render=":content" />
Do Stuff
</h:commandLink>