Auto refresh for views

Hi,

Recently I have a project to collect the ticker(stocks) data, and it will need to refresh frequently example refresh screen every 1 minute.
May I know anyone has the experience to make auto refresh on the client?
Is it possible to use pluging to do auto refresh to the view?

Hope to get help

Best Regard

I know it was previously implemented but it was removed.
If you search on the mercurial history you will probably find a version that has it implemented that can be used as source reference for reimplementing it.

Maybe you could rely on the bus to send message to the user. This would be less resource consuming than making a request every minute.

Moreover with the redesign of the bus we’ve made for the chat functionality people can now create client side plugins that could call their own code on bus event and thus refresh the current tab (or do anything else).

@nicoe @cedric I tried to use bus to send notification. But how do I refresh a specific form and how to know the any users open that form at the moment?

Do you have any clue or example I can follow?

In the message above I suggested that you should use a client side plugin.

You should use Sao.Bus.register to register a callback on a new channel that you will use. This callback would find the form you wan to refresh and make use of the screen client_action function to trigger the reloading of the form.

Then you can send the bus message at the end of the process that fills the database with your data.