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

Bug 312023

Summary: Provide setText-method in BrowserRidget
Product: [RT] Riena Reporter: Steffen Kriese <steffen.kriese>
Component: ridgetAssignee: Elias Volanakis <elias>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 2.0.0.RC1   
Hardware: PC   
OS: All   
Whiteboard:

Description Steffen Kriese CLA 2010-05-07 04:45:25 EDT
The BrowserRidget should provide a setText-method to supply a html-String.
Comment 1 Elias Volanakis CLA 2010-05-17 15:33:45 EDT
Hi Steffen,

I've committed browserRidget.setText(...). 

One issue I still have with this code is that there is no synchronisation for page loading, which happens asynchronously. In my experiments, I had undefined results in the scenario below. (I modified the SnippetBrowserRidget to have two buttons, one for ridget.setText and one for ridget.setUrl)

- start loading a url (best: a big page like techcrunch.com)
- while page loads  invoke ridget.setText(...)
- browser finishes loading the page and processes that
- result: ?

If you use ridget.setText(...) when initializing the controller this should not be a problem. 

If you run into issues please report them here and I will work with you in finding a solution. Unfortunatelly there is little in terms of API to cancel pending page processing, but I might be able to delay / queue things. However I would only like to add this complexity if needed.
Comment 2 Steffen Kriese CLA 2010-05-18 10:26:35 EDT
Thanks Elias,works like a charm :-)
We only want to provide a static html-String from the controller, so this will be sufficient.