Continuous polling JSF component to refresh its state
Robin Sharma
Ranch Hand
Joined: Aug 24, 2005
Posts: 76
posted
0
Hi!
I am using some standard JSF (MyFaces) components in an application. I want the dataTable to keep polling the server and refresh its state every, say n seconds. How should i go about it? The component itself is not Ajax-aware. Can it be done using some third-party libraries like DWR etc?
Thanks.
DW
There is always a bug :-)
Ravisekhar Kopparthi
Greenhorn
Joined: Jul 12, 2006
Posts: 5
posted
0
Hi Robin,
I don't remember any AJAX solution for your problem.
There is a simple trick in HTML
put this in head section of your JSP containing your JSF datatable <head> <meta http-equiv="refresh" content="600"> </head>
where 600 is the number of seconds the browser waits to refresh the page.
In your backing bean do a databind at every refresh.
Hope this helps.
Thanks Ravi
Robin Sharma
Ranch Hand
Joined: Aug 24, 2005
Posts: 76
posted
0
Originally posted by Ravisekhar Kopparthi: Hi Robin,
I don't remember any AJAX solution for your problem.
There is a simple trick in HTML
put this in head section of your JSP containing your JSF datatable <head> <meta http-equiv="refresh" content="600"> </head>
where 600 is the number of seconds the browser waits to refresh the page.
In your backing bean do a databind at every refresh.
Hope this helps.
Thanks Ravi
Hi Ravi!
This solution would be like a last resort as i have a lot of other data on the screen which will unnecessarily get submitted. What i want is a partial refresh for the dataTable component with polling capability.