RAP Form Timer Refresh [message #1124704] |
Thu, 03 October 2013 20:38 |
Jason Fauble Messages: 10 Registered: June 2011 Location: Tallahassee, Florida |
Junior Member |
|
|
Environment: Eclipse Scout 3.9, RAP
Browser(s): Firefox/Chrome
I am trying to refresh a form based on a timed event. I attempted to use the form timer in conjunction with the execTimer(...) method. The event fires as expected but the form does not refresh until another UI event is triggered (i.e. mouse click, hover over a table row, browser refresh, etc.)
I then tried to follow the polling approach outlined in this thread (http://www.eclipse.org/forums/index.php/t/444558/), but I had the same results.
I have also looked for methods that will force the GUI to refresh, but nothing I have tried has had any effect.
Any help would be greatly appreciated.
Thanks,
Jason
REFRESH: Any ideas on this issue?
[Updated on: Wed, 09 October 2013 16:05] Report message to a moderator
|
|
|
Re: RAP Form Timer Refresh [message #1183648 is a reply to message #1124704] |
Wed, 13 November 2013 01:02 |
Lukas Huser Messages: 42 Registered: March 2010 |
Member |
|
|
Hi Jason
The two approaches you tried (execTimer() on a form and the polling approach described by Beat) both work in a similar way (we update the client model from a background job). This works on SWT and Swing clients, where these changes are reflected on the UI immediately.
Now it seems that we need to do some extra work for RAP clients, such that these changes are also pushed to the web browser. RAP knows a concept called ServerPushSession which allows exactly this (it was called UICallBack in earlier versions, see [1] for more info).
The current Scout Kepler (3.9) release makes use of a ServerPushSession. It will be enabled if you enable client notifications. To do so, uncomment the code in ClientSession.execLoadSession() which sets a client notification polling interval (the default is 2 seconds).
Alternatively you can override needsClientNotificationServerPushSession() in your StandaloneRwtEnvironment and always return true. This will also permanently enable a ServerPushSession.
[1] http://wiki.eclipse.org/RAP/FAQ#How_to_update_the_UI_from_a_background_thread.3F
[Updated on: Wed, 13 November 2013 01:06] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 2.37816 seconds