p:poll frequency is ignored

UI Components for JSF
Post Reply
barak
Posts: 76
Joined: 22 Sep 2009, 16:39

05 Nov 2009, 18:54

I put that in my xhtml:

Code: Select all

<p:poll frequency="3600" update="stats" />
But when watching firebug, I saw that request to server is made every 2 ms. Wathcing the HTML explains why:

Code: Select all

<script type="text/javascript">YAHOO.util.Event.addListener(window, 'load', function() {
j_id29_widget= new PrimeFaces.widget.Poll('j_id29', {formClientId:'j_id18',url:'/my2/ui.jsf',update:'stats',frequency:2});});</script>
frequency is set to 2, instead of 3600. Is it something I missed or a bug?

Thanks.

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

05 Nov 2009, 23:58

Hi,

can you check http://97.107.138.40:8080/prime-showcase/ui/poll.jsf with your firebug to see if it is working in 3 seconds frequency?

Yigit

barak
Posts: 76
Joined: 22 Sep 2009, 16:39

06 Nov 2009, 00:02

Yep, seems like 3 sec.

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

06 Nov 2009, 01:58

So, it seems like frequency is working,

I think I found the error, interval attribute is used in setting the frequency so your code should be something like:

Code: Select all

<p:poll interval="3600" update="stats" />
can you check that this works?

( Btw interval attribute is based on seconds, so your poll will be updated in 3600 seconds = 60 minutes = 1 hour )

Yigit

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Nov 2009, 02:53

We need to fix the showcase source, the attribute name is interval, not frequency.

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

06 Nov 2009, 10:13

Ok, demo is fixed.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Nov 2009, 11:13

Thanks mate.

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

06 Nov 2009, 12:00

needs a re-deploy brotha. ;)

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Nov 2009, 12:45

Aksam ;)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests