Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP Client Service Lifecycle
RAP Client Service Lifecycle [message #1043251] Wed, 17 April 2013 09:18 Go to next message
Arnaud MERGEY is currently offline Arnaud MERGEY
Messages: 128
Registered: March 2010
Location: France
Senior Member
Hello,

While testing BrowserNavigation Service, I noticed if it is requested before createContents for an AbstractEntryPoint, this service is not working for the whole session.

I have attached a small project to illustrate this, by launching Client Service OK
the page allow to push state in browser history, with Client Service KO, this does not work.
The only differences between the 2 is the call to RWT.getClient().getService(BrowserNavigation.class); in EntryPoint constructor

Is it something expected ? if yes,an exception should probably be thrown if access is illegal here.

Regards,
Arnaud

[Updated on: Wed, 17 April 2013 09:54]

Report message to a moderator

Re: RAP Client Service Lifecycle [message #1043821 is a reply to message #1043251] Thu, 18 April 2013 02:59 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1783
Registered: July 2009
Senior Member
Hi Arnaud,
all client services are session singletons. The BrowserNavigation
Service needs a valid Display instance (current display) when it is
created (obtained for the first time) - see BrowserNavigationImpl
constructor. If you get this service in the entry point constructor
(before EntryPoint#createUI method) the display is not yet created. As a
result BrowserNavigation Service cannot get the correct session - inner
display field is null.
HTH,
Ivan

On 4/17/2013 4:19 PM, Arnaud MERGEY wrote:
> Hello,
>
> While testing BrowserNavigation Service, I noticed if it is requested before createContents for an AbstractEntryPoint, this service is not working for the whole session.
>
> I have attached a small project to illustrate this, by launching Client Service OK
> the page allow to push state in browser history, with Client Service KO, this does not work.
> The only differences between is the call to RWT.getClient().getService(BrowserNavigation.class); in EntryPoint constructor
>
> Is it something expected ? if yes,an exception should probably be thrown if access is illegal here.
>
> Regards,
> Arnaud

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Client Service Lifecycle [message #1043836 is a reply to message #1043251] Thu, 18 April 2013 03:14 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1783
Registered: July 2009
Senior Member
.... but maybe this display field and the check is not needed anymore
(the BrowserNavigation is a client service (session singleton) and it
has the correct session). Please open a bugzilla about it.
Thanks,
Ivan

On 4/17/2013 4:19 PM, Arnaud MERGEY wrote:
> Hello,
>
> While testing BrowserNavigation Service, I noticed if it is requested before createContents for an AbstractEntryPoint, this service is not working for the whole session.
>
> I have attached a small project to illustrate this, by launching Client Service OK
> the page allow to push state in browser history, with Client Service KO, this does not work.
> The only differences between is the call to RWT.getClient().getService(BrowserNavigation.class); in EntryPoint constructor
>
> Is it something expected ? if yes,an exception should probably be thrown if access is illegal here.
>
> Regards,
> Arnaud

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Client Service Lifecycle [message #1043898 is a reply to message #1043836] Thu, 18 April 2013 04:36 Go to previous message
Arnaud MERGEY is currently offline Arnaud MERGEY
Messages: 128
Registered: March 2010
Location: France
Senior Member
Thanks, Ivan, I have created 405951.
Previous Topic:Absolutly no luck trying out RAP.
Next Topic:File Upload Incubator Not Signed in RAP 2.0 compatible p2 repository
Goto Forum:
  


Current Time: Thu Jul 31 07:49:13 EDT 2014

Powered by FUDForum. Page generated in 0.02119 seconds