File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes JSF render continously Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF render continously" Watch "JSF render continously" New topic

JSF render continously

eddy johns
Ranch Hand

Joined: Feb 16, 2010
Posts: 67
Hi all,

I'm new to JSF so excuse the newbie question.

I need to continuously update a text field with values that come from the server. The idea is similar to that of a clock, updating every one second (for example.) I was thinking I could use this tag:

<f:ajax render="serverData"/>

but with something like render-continuously, as in:

<f:ajax render-continuously="serverData"/>

but of course render-continuously doesn't exist...

So, how do you achieve this?


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Continuously is a bit much. It sounds more like you want to poll at one-second intervals.

I'm no expert on the new JSF2 ajax tag, but the JBoss RichFaces extension tagset includes a "poll" tag to handle stuff like that.

An IDE is no substitute for an Intelligent Developer.
eddy johns
Ranch Hand

Joined: Feb 16, 2010
Posts: 67
Thanks, Tim.

I'm looking into the solution you're suggesting and I'm running into a problem.

The following code, from the tutorial on the web on this tag:

<hutputText id="txt_count" value="#{navBean.count}" />
<p:poll actionListener="#{navBean.increment}" interval="1000" update="txt_count" />

is in a


with the appropriate closing tags. But when I try to hit the page it generates a Property 'increment' not found on type com.roberts.ui.NavBean exception, and the page isn't rendered.

The increment method is there in the bean:

public void increment(ActionEvent actionEvent) {

What am I doing wrong? Any help would be greatly appreciated!
I agree. Here's the link:
subject: JSF render continously
It's not a secret anymore!