Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » RAP Form Timer Refresh(Attempting to update a form using the execTimer(...) method fails to refresh form in RAP)
RAP Form Timer Refresh [message #1124704] Thu, 03 October 2013 20:38 Go to next message
Jason Fauble is currently offline Jason FaubleFriend
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 Go to previous message
Lukas Huser is currently offline Lukas HuserFriend
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

Previous Topic:Force RadioButtonGroup to re-read its values from LookupCall
Next Topic:Slow startup of Swing Client
Goto Forum:
  


Current Time: Sun Dec 21 12:49:11 GMT 2014

Powered by FUDForum. Page generated in 0.16280 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software