Using the af:poll to refresh parts of the page periodically

Just a quick sample of using the af:poll components. A component that enables you to do things in a periodic fashion. For example check if something has changed on the server and update the UI.

A more "modern" approach is to actually use push instead of pull, and ADF Faces will allow you to do that with ADS (here, and here). But the poll still has its place.
It's quite useful for dashboard type of applications where you want periodic updates of the graphs shown on the page.

As you can see it's quite simple to use the tag.
I also show my lazy approach to invoking declarative operations on a data control from a backing bean without manually writing code.

Comments:

Hi, is this video without sound? Best regards

Posted by Martin on December 25, 2010 at 10:16 PM PST #

oops, good catch - I updated this entry with a video that has the sound now.

Posted by shay.shmeltzer on December 27, 2010 at 02:10 AM PST #

It will be more useful if you have a sample workspace. It is really hard to see what/why you are doing from video. It is typical Oracle way

Posted by Dn on February 25, 2011 at 08:10 AM PST #

One note on the quality of the video - if you have a good enough broadband, you can set the resolution of the youTube video to 720 and expand it to full screen - this usually allows you to see exactly what is going on.

Posted by shay.shmeltzer on February 25, 2011 at 08:50 AM PST #

Very informative video.. thanks for sharing.

Posted by guest on June 08, 2011 at 01:35 AM PDT #

People should be aware that the af:poll event will keep the session alive. In a secure application we had to implement code that would differentiate between user events and poll events and expire the session accordingly if there was no real user activity within the session timeout period.

Posted by Don Kleppinger on May 11, 2012 at 04:24 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today