0

I am using PrimeFaces 3.4 (JSF 2.0) and thinking of using PrimeFaces extensions for below requirement.

What i want is: (I have prices updated hourly in my webapp)(say its 9:30) then user can see stock price till 9:00 and when it is 10:xx, user can see stock price for 9:00 and 10:00. So what i basically want is that my method gets called at 10:00(10:00 being the next time values are updated.) and then at hourly interval.

i can use pe:timer but that will start from the time user opens web page and not from the time next value is updated.

Jay K
  • 23
  • 1
  • 6

1 Answers1

0

You have two choices available to you in PrimeFaces:

  1. Create a p:remoteCommand element to update your stock price element, then write your own javascript timer to call it at the correct interval.
  2. Create a p:socket element to receive update notifications pushed from your server.

Neither of these options require Pf extensions. IMO option #1 would be the easiest.

codeturner
  • 993
  • 1
  • 8
  • 20