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

Bug 341760

Summary: Replace PreserveWidgetsPhaseListener by preserving widgets in READ_DATA phase
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 1.4 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed changes none

Description Rüdiger Herrmann CLA 2011-04-04 06:13:00 EDT
Preserving the state of all widgets before the PROCESS_ACTION pahse is run is an integral part of the RWT lifecycle.
Therefore I suggest to not code run from a phase-listener anymore but instead run from within the RENDER phase.
Any objections?
Comment 1 Ralf Sternberg CLA 2011-04-19 05:33:29 EDT
+1
I agree that getting rid of the PhaseListener would simplify matters.
Comment 2 Rüdiger Herrmann CLA 2011-04-19 08:48:36 EDT
Created attachment 193574 [details]
Proposed changes

The PreserveWidgetsPhaseListener is gone. Its functionality was moved to DisplayLCA and two new methods, preserveValues() and clearPreserved() have been introduce.
preserveValues() is called in the READ_DATA phase from ReadData#execute(), after DisplayLCA#readData() was called.
To free resources, clearPreserved() is called from Render#execute() after the actual rendering was done.

Though this simplifies matters, the DisplayLCA should only be responsible for rendering, preserving, ... its own 'things'. 
Currently it does this *and* iterates over the widget tree to have the widgets render, preserve, ... themserves. This code could be moved from DisplayLCA to the respective IPhase implementations. However, I would prefer to make this change in an extra step.

Opinions?
Comment 3 Rüdiger Herrmann CLA 2011-04-20 08:21:39 EDT
Committed patch to CVS HEAD