I want to implement a live filter for a list with JSF 2 but when using keyup
event so many requests are being sent to the server. The code looks like:
<h:inputText id="filter_input" value="#{bean.filterText}">
<f:ajax event="keyup" listener="#{bean.filter}"
render="@form:list" execute="@this" />
</h:inputText>
f:ajax
has added support for ajax event delay starting from JSF 2.2. Just include it as an attribute with its value in miliseconds:
<f:ajax event="keyup" delay="1000" listener="#{someBean.doSomething}"
render="somefield" execute="@this" />
See also:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With