Project: Eclipse_Platform_UI
Bug 171132 [DataBinding] Incorrect interaction between observeText(field, FocusOut) and Binding.updateModelFromTarget
Reported: 2007-01-20 09:04:58 | Status: verified fixed

Build: RCP SDK 3.3M4, databinding plugins from CVS at 17-Jan-2007 Steps To Reproduce: Make a Text field, attach a Binding to it via SWTObservables.observeText(field, SWT.FocusOut). The binding must involve a targetValidator/domainValidator. Also, create a key listener that responds with Binding.updateModelFromTarget(). Then: 1. Tab into the text field. 2. Enter some legal value. 3. Tab out of it and tab back in. 4. Change the entry to an illegal value, do not tab out. 5. Execute on-demand validation (for example, I set up a KeyListener responding to F5 for this). The GUI shows a validation failure notice. 6. Change the value back to the legal value of Step 2. 7. Now tab out of the field. The field is not revalidated and the validation failure notice stays on. A JUnit test will be attached that exercises this scenario.

Files changed in fix:
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TextControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/swt/TextObservableValueTest.java