Community
Participate
Working Groups
Around my work with MessageManager/Databinding integration I got the idea to work on a ValidationStatusProvider that validates content of an editable TableViewer. The Problem is with EditingSupport that validation happens only when Items are edited, and messages get lost when leaving the cell editor. So far so good attached is the hack I have so far (I only have IObservaleSets as input) I abuse an totaly abnorm IObservable wrapper for the table to make the messageManager render the decoration on the table. The only way to get this message out to the messagemanager seems to be getModels(). Any ideas on improving this will be appreciated. I thought of decorating a concrete TableItem thats erroneous but MessageManager only decorates Controls. Any ideas on using a decorating label Provider ? see also bug #219661
with help from matthew hall it got even easier and more flexible.
Thomas, were you going to post an attachment?
Matthew, I was straight up to do this when I noticed that it didn't work. I post the demo app instead which demonstrates my problem with the validator does not get notified when updating the cell. Maybe you can have a look it it, it should work quite straightforward.
Created attachment 125158 [details] Demo to show problem
Created attachment 125307 [details] Updated snippet Your MultiValidator was working correctly. It was the code that adds listeners to all validation status providers that did not work. What you want to use is AggregateValidationStatus. If this class doesn't do what you want, it would be easier to observe all the validation statuses like this: IObservableList validationStatuses = BindingProperties.validationStatusProviders() .values(BindingProperties.validationStatus()).observe(bindingContext); This will give you an IObservableList<IStatus>
WORKSFORME. If I missed anything please reopen. BindingProperties was only added 4 days ago so you may need to update from CVS to get it.
Hi Matthew, this is all quite nice (don't clearly see the bug be now), but I need the ValidationStatusProvider to get the targets/models for the stati. I then use MessageManager to decorate the appropriate widgets. If you have any hint how the solve this in another clean way, let me know. I tried the latest code from cvs but it gives me more headache :) see bug #264925
(In reply to comment #7) > Hi Matthew, this is all quite nice (don't clearly see the bug be now), but I > need the ValidationStatusProvider to get the targets/models for the stati. I > then use MessageManager to decorate the appropriate widgets. Are you talking about ControlDecoration / FieldDecoration ? Personally I think we should add support for those right into jface.databinding. I don't know anything about MessageManager so it would help if you could spell out that part a little more.
MessageManager simple takes a control with its message that then gets decoratet. I inspect the targets/models to find the control thats bound. Thats all.
(In reply to comment #7) > ..If you have any > hint how the solve this in another clean way, let me know. I tried the latest > code from cvs but it gives me more headache :) see bug #264925 Please provide an "unclean" example of how you decorate controls currently so I can see the problem. Standalone snippets are best.
Clearing target milestone until more information is provided
Created attachment 127077 [details] Decorating Controls from Observables
Hi Matthew, look at the still buggy code I attached. Its in "guessControl" what I actually mean. Should be straightforward.
Ran out of time for 3.5.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.