PrimeFaces中同一p:ajax中的多个事件 [英] Multiple events in the same p:ajax in PrimeFaces
本文介绍了PrimeFaces中同一p:ajax中的多个事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
同一 p:ajax 中是否可能有多个事件?
Is it possible to have multiple events in the same p:ajax?
类似这样的东西:
<p:ajax event="firstEvent,secondEvent..." listener="doSomething();" />
推荐答案
我知道以后了,但是我发现了并且做到了这一点,您只需要放置p:ajax的N个标签,即:
I know it's later but I found and way to do this, You only need to put N tags of p:ajax, i.e:
<p:calendar id="startDate" value="#{bean.date}"
pattern="dd.MM.yyyy"
validator="#{bean.checkDate}">
<p:ajax update="dialog:endDate" event="dateSelect" />
<p:ajax update="dialog:endDate" event="keyup" />
</p:calendar>
这篇关于PrimeFaces中同一p:ajax中的多个事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文