O'Reilly logo

JBoss RichFaces 3.3 by Demetrio Filocamo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Advanced Techniques

This chapter is going to talk about some "advanced" RichFaces topics. You will discover with single examples how to use and implement pushing, partial updates, session expiration handling, and so on.

Poll

By using the a:poll component, you can periodically poll the server for data and updates using an Ajax request. The use is the same as for a:commandButton and a:commandLink, so you can invoke an action and re-render one or more page areas.

This component uses a form-based request, so, it is required to put the a:poll component inside h:form.

Here there is a little example that shows how to use it:

<h:form> <a:poll id="poll" action="#{aBean.pollAction}" interval="500" reRender="result" /> </h:form> <h:outputText id="result" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required