Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 405951

Summary: BrowserNavigation corrupted for the whole session, if requested before display creation
Product: [RT] RAP Reporter: Arnaud MERGEY <a_mergey>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan
Version: 2.0   
Target Milestone: 2.1 M2   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
sample application none

Description Arnaud MERGEY CLA 2013-04-18 04:33:26 EDT
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

In BrowserNavigationImpl, it seems display field is not necessary so "if( display == sessionDisplay )"  check in  afterPhase and beforePhase 
should be removed, so as the display field.
If this check is really necessary, an exception should be thrown if not true.
Comment 1 Arnaud MERGEY CLA 2013-04-18 04:34:10 EDT
Created attachment 229846 [details]
sample application
Comment 2 Ivan Furnadjiev CLA 2013-04-18 04:45:05 EDT
(In reply to comment #0)
> In BrowserNavigationImpl, it seems display field is not necessary so "if(
> display == sessionDisplay )"  check in  afterPhase and beforePhase 
> should be removed, so as the display field.
> If this check is really necessary, an exception should be thrown if not true.
The check is needed as phase listeners have application scope. What we can do is to replace the display field with uiSession field.
Comment 3 Ivan Furnadjiev CLA 2013-04-22 09:09:02 EDT
Fixed in master with commit f02094f925279e6c645a008a53668d08442d7da0.