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

Bug 447196

Summary: [JavaDoc] Update RWT.HYPERLINK JavaDoc
Product: [RT] RAP Reporter: Chris Fairhall <chris>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.3   
Target Milestone: 3.0 M4   
Hardware: PC   
OS: Windows 8   
Whiteboard:

Description Chris Fairhall CLA 2014-10-14 17:27:11 EDT
I've got a Label widget with RWT.MARKUP_ENABLED to show some A tags with target="_rwt" so I can capture the selection event.

The result when clicking the link is a new tab is opened and the href is navigated to.

I've had a quick look through the Javascript code and it appears only Grid.js List.js and Menu.js handle the target property correctly.

Is this because Label's don't usually produce SWT.Selection events?
If that's the case and this is by-design then perhaps the Javadoc for RWT.HYPERLINK should be updated, as it implies it covers all A tags.
Comment 1 Ivan Furnadjiev CLA 2014-10-15 01:25:27 EDT
(In reply to comment #0)
> Is this because Label's don't usually produce SWT.Selection events?
> If that's the case and this is by-design then perhaps the Javadoc for
> RWT.HYPERLINK should be updated, as it implies it covers all A tags.
Exactly. This is by design. As Label/CLabel do not fire Selection event, _rwt target on the link is not handled differently. Mark this bug as enhancement to update the JavaDoc as suggested.
Comment 2 Ivan Furnadjiev CLA 2014-11-17 04:43:20 EST
By reading the RWT.HYPERLINK JavaDoc again, I think it's perfectly clear that it's "used as detail information on a selection event" and could be used only on widgets that fire *selection* event.
Comment 3 Ivan Furnadjiev CLA 2014-11-18 04:48:00 EST
Fixed with change https://git.eclipse.org/r/#/c/36556/