| Summary: | [DataBinding] Need editing life cycle events on the data binding framework | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dave Orme <djo> |
| Component: | UI | Assignee: | Dave Orme <djo> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | bokowski, eclipse, fg, gmendel, herr, Joel.Kamentz, Konstantin.Scheglov, qualidafial, Winchest |
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 120582 | ||
|
Description
Dave Orme
> (16:30:47) David: Maybe event methods like: keystrokeSaveOccured(),
> fieldSaveOccured(), objectSaveOccured(), explicitSaveOccurred()
Also updatableBecameDirty(), per the early part of our discussion.
This is also important for adding logging or other debug listeners to a data binding connection for tracking when things go wrong. We believe that this is also the proper way to add a master validator for hooking up business logic validation. Here is what we see right now: Vetoable life cycle events at every edge in the following graphs: target2model copy get -> Validate -> convert -> businessValidate -> set model2target copy get -> convert -> set isDirtyChanged Released to HEAD -> 20060124 If the events provided prove inadaqute for someone's needs, please reopen and add a comment. Several have asked for an event that is fired whenever any of the validation events fail. Reopening until that is solved. from https://bugs.eclipse.org/bugs/show_bug.cgi?id=119791#c11 : very nice would be an active Information, if the validation (and also business-validation) has failed in the ValueBinding: eg: public void updateModelFromTarget(...) { ... validationError = doValidate(e.originalValue); if (validationError != null) { e.pipelinePosition = BindingEvent.PIPELINE_AFTER_VALIDATION_FAILED; fireBindingEvent(e); context.updatePartialValidationError(targetChangeListener, validationError); return; } ... } Is there any other possibility to recognize, that a validation has failed? Changing priority to P2. BOOKMARK. This is a bookmark comment so I can find this bug again easily. :-) This bug appears obsolete: "Dirty" events mentioned in comment #0 are covered by IStaleListener and IChangeListener. Delaying copy-target-to-model bindings as discussed in comment #0 is possible using POLICY_NEVER update strategies. It is possible to observe validation events mentioned in comment #4 by observing either DBC.getValidationStatusMap() or Binding.getValidationStatus(). Did I miss any aspects of this bug that are still outstanding? See also Snippet 14 (the one with a wizard dialog) and the wizard support class it references. To find out whether the user has started changing values in the wizard page, a change listener is added to all target (UI) observables by iterating over all bindings and retrieving each binding's target observable. |