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

Bug 407397

Summary: ControlDecorator is not disposed when decorated control is disposed
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ivan Furnadjiev CLA 2013-05-07 08:14:47 EDT
Reproducible with Controls Demo -> ControlDecoration tab. Select TOP or BOTTOM check box -> we have two decorators on the screen - the old one is not disposed.
Comment 1 Ivan Furnadjiev CLA 2013-05-07 08:19:27 EDT
The reason for this issue is two different parents are returned:
- ControlDecorator#getParent() returns decorated control parent
- WidgetAdapter#getParent() returns decorated control 
Currently on the client the parent of the ControlDecorator is the parent of the decorated control.
Comment 2 Ivan Furnadjiev CLA 2013-05-07 10:41:28 EDT
Fixed with commit de43480f702804a3edac81746fc3780eeb2fe018 by rendering destroy operation regardless parent disposal state. A more cleaner solution will be to make the ControlDecorator parent on the client the decorated control too, which is not possible right now - not all controls (Text.js for example) extend Parent.js.
Comment 3 Ivan Furnadjiev CLA 2013-05-08 08:45:12 EDT
With this change the Controls Demo crashes with JavaScript error when navigating away from the ControlDecoration tab.
Comment 4 Ivan Furnadjiev CLA 2013-05-08 11:02:54 EDT
(In reply to comment #3)
> With this change the Controls Demo crashes with JavaScript error when navigating
> away from the ControlDecoration tab.
Fixed with commit 17865f4c6f3c431fa3d361f70dd80e06d5cc08af.