RAP Client Service Lifecycle [message #1043251] |
Wed, 17 April 2013 13:18 |
Arnaud MERGEY Messages: 243 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 13:54] Report message to a moderator
|
|
|
Re: RAP Client Service Lifecycle [message #1043821 is a reply to message #1043251] |
Thu, 18 April 2013 06:59 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
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 07:14 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02682 seconds