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

Bug 158065

Summary: [DataBinding] ValidationError observables need a nudge to hook themselves up
Product: [Eclipse Project] Platform Reporter: Dave Orme <djo>
Component: UIAssignee: Dave Orme <djo>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bradleyjames, villane
Version: 3.2   
Target Milestone: 3.3 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Dave Orme CLA 2006-09-20 16:36:33 EDT
See attached patch.
Comment 1 Dave Orme CLA 2006-09-20 16:40:16 EDT
Created attachment 50596 [details]
Patch
Comment 2 Brad Reynolds CLA 2006-10-05 00:14:26 EDT
Dave, is this still needed?  What was the problem that this fixed?  In looks like in the patch there was a change to ComputedValue but some other clean up for other files as well.
Comment 3 Dave Orme CLA 2006-10-05 08:24:19 EDT
Yes, this is still needed.

The problem is that if you only add a change listener to the validation error observable, it never hooks itself up as a listener to the things it listens to.

This patch fixes this.

Comment 4 Brad Reynolds CLA 2006-10-05 08:46:45 EDT
The reason I ask is that I'm trying to figure out what is different in this and bug 140644.  The problem in bug 140644 was that bindings weren't being added to the internal list of bindings.  But now that they are observation of validation error appears to be working, at least with a simple use case.  I'm sure I'm missing something, just trying to figure out what.
Comment 5 Boris Bokowski CLA 2006-10-05 09:37:27 EDT
(In reply to comment #4)
> But now that they are observation of validation
> error appears to be working, at least with a simple use case.  I'm sure I'm
> missing something, just trying to figure out what.

It is working because when binding to the validation error, the binding will add a listener *and* call getValue.  This bug is about a case where you only add a listener and expect to receive updates, but don't since adding a listener to a ComputedValue did not cause the ComputedValue to listen to its dependent observables.

BTW, this bug was probably observed while using the deprecated DataBindingContext subclass, which did add its bindings to the context.
Comment 6 Boris Bokowski CLA 2006-10-05 09:56:52 EDT
Dave, most of this patch seems to be in HEAD already.  I have released the change to ComputedValue for builds >20061005.  Could you please check if there is anything else that needs to be released, and if not, set this bug to FIXED? Thanks.
Comment 7 Mike Wilson CLA 2007-05-08 11:29:32 EDT
Still waiting on resolution to this. Please mark as fixed or update milestone appropriately.
Comment 8 Dave Orme CLA 2007-05-08 11:37:48 EDT
Oops. This should be resolved>fixed.  Thanks for the nudge. :-)