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

Bug 342236

Summary: BrowserFunction lost after URL changes
Product: [RT] RAP Reporter: Flavio Donze <flavio.donze>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: unspecified   
Target Milestone: 1.4 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Manipulated Demo none

Description Flavio Donze CLA 2011-04-08 03:14:40 EDT
Build Identifier: 1.3.1.20100915-2301

After you change the URL of the bowser, ether through browser.setUrl() or in a link of the HTML itself, the BrowserFunction is not available anymore.

Reproducible: Always
Comment 1 Flavio Donze CLA 2011-04-08 03:17:19 EDT
Created attachment 192796 [details]
Manipulated Demo

org.eclipse.rap.demo.DemoBrowserViewPart
resources/test1.html
resources/test2.html
plugin.xml (added test1 and test2 as org.eclipse.equinox.http.registry.resources)
Comment 2 Flavio Donze CLA 2011-04-08 03:21:53 EDT
Hit "TEST": works (returns null and system out)
Hit "GOTO Test2" in the Browser and there "TEST": fails
Hit the button "goto Test2"  and there "TEST: fails
Comment 3 Ivan Furnadjiev CLA 2011-04-08 04:08:59 EDT
Flavio, we did a lot of changes related to Browser and BrowserFunction in 1.4. Now, we are registering BrowserFucntions on Browser onLoad event. Just test it with CVS HEAD and BrowserFuction is re-registered if you change the URL from the server side (click on the Button). After clicking on the link in the HTML page the onLoad event is not fired and browser function is not re-registered - we need to investigate this.
Comment 4 Flavio Donze CLA 2011-04-11 05:06:31 EDT
Just for the record, yes the "Button Test" worked using RAP 1.4.0.20110315-1602.
Comment 5 Tim Buschtoens CLA 2011-04-11 05:51:39 EDT
Fixed in CVS HEAD

The browser-functions are now re-created on every dom-level load event.