Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Using ViewerSupport with RAP/Jface(Need guidance/examples on using ViewerSupport databindingwith RAP)
Using ViewerSupport with RAP/Jface [message #1726409] Sat, 12 March 2016 23:26 Go to next message
Ray Jantz is currently offline Ray JantzFriend
Messages: 5
Registered: March 2016
Junior Member
I am struggling trying to use ViewerSupport databinding with RAP/Jface. The main problem is the requirement that there be a realm established before calling ViewerSupport.bind. I can't find any good guidance on how to do this. The guidance I've been able to find seems to suggest that, in order to set the realm, you need to bypass ViewerSupport and use the lower-level APIs for setting up observables, etc., but this seems to defeat the purpose of having nice high-level API like ViewerSupport Is there any information or examples around that illustrate this?
Re: Using ViewerSupport with RAP/Jface [message #1726546 is a reply to message #1726409] Mon, 14 March 2016 14:54 Go to previous messageGo to next message
Markus Knauer is currently offline Markus KnauerFriend
Messages: 179
Registered: July 2009
Senior Member

Hi Ray,

I assume you are using RAP in the JEE mode?

And may I ask which version of RAP you are using?

As a starting point I'd suggest reading bug 389040 (Databinding support in the JEE mode) which describes the basic idea and has some code snippets. The idea is always the same: Create a Realm instance very early and store it in the UI session; in follow up requests this realm instance must be retrieved from the UI session before doing any other actions in one of the early phases. If interested I could send more detailed examples.

Thanks,
Markus


--

Twitter: @mknauer23 and @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Using ViewerSupport with RAP/Jface [message #1727638 is a reply to message #1726546] Thu, 24 March 2016 16:14 Go to previous message
Ray Jantz is currently offline Ray JantzFriend
Messages: 5
Registered: March 2016
Junior Member
Thanks for the reply and the reference. I'm just now getting back to look at this. I was using JEE mode when I saw the problem, but switched to SWT-compatibility mode as a workaround. That worked for me, however now I am seeing another problem. The app displays a tableviewer table and has a refresh button to refresh the table, and before doing the actual refresh, it writes "refreshing ..." to the status bar. This all works fine as long as there is one instance of the app, but when I bring up a second instance (in another tab or another browser), I invariably see "SWT invalid thread access" on the attempt to write to the status bar if I refresh in one instance and then try to do the same in the other. I changed the code to use asyncExec, thinking it was a problem with not being on the UI thread, but that did not help. Could following the advice in the reference you provided have some some bearing on this? I assume RAP is not restricted to having only one instance of an app?
Previous Topic:Is it possible to have application level custom error page
Next Topic:Dynamic css
Goto Forum:
  


Current Time: Tue Mar 19 02:13:22 GMT 2024

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

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

Back to the top