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

Bug 319108

Summary: inconsistent models after #copyBean in MasterDetailsRidget with ToggleButtonRidget in details area
Product: [RT] Riena Reporter: Holger Hoch <holger.hoch>
Component: ridgetAssignee: Elias Volanakis <elias>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: christian.campo, elias
Version: 2.0.0   
Target Milestone: 3.0.0.M4   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 303179    
Attachments:
Description Flags
java class to reproduce bug
none
Snippet to reproduce issue
none
Fix none

Description Holger Hoch CLA 2010-07-07 07:35:59 EDT
Build Identifier: 2.0.0

If using a ToggleButtonRidget within the details area of a MasterDetailsRidget that is configured to use direct writing the delegates #copyBean method is called *before* the model of the ToggleButtonRidget resulting in inconsistent models

Reproducible: Always

Steps to Reproduce:
start attached code and click checkbox a few times
Comment 1 Holger Hoch CLA 2010-07-07 07:38:18 EDT
Created attachment 173637 [details]
java class to reproduce bug
Comment 2 Elias Volanakis CLA 2010-07-15 19:04:14 EDT
Reproducible. 

This is a conceptual issue with the ridgets embedded in the details area. The order how listeners are notified is not guaranteed, so  the master details ridget may look at the model before it is actually changed. For text ridgets I've added the "textAfter" property but I think we need a permanent fix or a new official event (like "afterUpdate").

Offer to look at this in the next sprint.
Comment 3 Elias Volanakis CLA 2010-07-15 19:22:54 EDT
Created attachment 174461 [details]
Snippet to reproduce issue

Slightly modified snippet (tracing code, apply button)
Comment 4 Elias Volanakis CLA 2010-12-08 21:13:39 EST
Created attachment 184830 [details]
Fix

The attached patch fixes all occurrences of this issue (in ToggleButtonRidget and elsewhere). Attaching for reference purposes.
Comment 5 Elias Volanakis CLA 2010-12-08 21:17:44 EST
Resolved in HEAD.