a4j:jsFunction actionListener 未监听
侦听器是:
public void renderer(ActionEvent event) {
System.out.println("here=========================");
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
setOptimizeActionDTOs(null);
}
和 setOptimizeActionDTOs
public void setOptimizeActionDTOs(List<OptimizeActionDTO> optimizeActionDTOs) {
this.optimizeActionDTOs = optimizeActionDTOs;
}
, a4j:jsFunction 是:
<a4j:form>
<a4j:jsFunction name="renderOptimizeActionList" actionListener="#{rtopHandler.renderer}" oncomplete="renderOptimizeActionList1();"/>
<a4j:jsFunction name="renderOptimizeActionList1" reRender="profilealertpanel1"></a4j:jsFunction>
<script language="JavaScript">
renderOptimizeActionList();
</script>
</a4j:form>
但我看不到 System.out 的任何输出。为什么?任何信息都会对我非常有帮助。
谢谢。
The listener is:
public void renderer(ActionEvent event) {
System.out.println("here=========================");
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
setOptimizeActionDTOs(null);
}
and setOptimizeActionDTOs
public void setOptimizeActionDTOs(List<OptimizeActionDTO> optimizeActionDTOs) {
this.optimizeActionDTOs = optimizeActionDTOs;
}
And the a4j:jsFunction is:
<a4j:form>
<a4j:jsFunction name="renderOptimizeActionList" actionListener="#{rtopHandler.renderer}" oncomplete="renderOptimizeActionList1();"/>
<a4j:jsFunction name="renderOptimizeActionList1" reRender="profilealertpanel1"></a4j:jsFunction>
<script language="JavaScript">
renderOptimizeActionList();
</script>
</a4j:form>
But I can't see any output of the System.out
. Why? Any information will be very helpful to me.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将
标记放在
Try putting your
<script>
tags outside the<form>
tags.Further, you can check whether the
<a4j:jsFunction>
is called by putting an "alert()" on onbegin event of the<a4j:jsFunction/>