Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341760 - Replace PreserveWidgetsPhaseListener by preserving widgets in READ_DATA phase
Summary: Replace PreserveWidgetsPhaseListener by preserving widgets in READ_DATA phase
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 06:13 EDT by Rüdiger Herrmann CLA
Modified: 2011-04-20 08:21 EDT (History)
0 users

See Also:


Attachments
Proposed changes (65.92 KB, patch)
2011-04-19 08:48 EDT, Rüdiger Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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