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

Bug 365915

Summary: [Databinding] No correct initial errormessage in TitleAreaDialogSupport
Product: [Eclipse Project] Platform Reporter: Mark Hoffmann <m.hoffmann>
Component: UIAssignee: Conrad Groth <info>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: info, remy.suen
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Mark Hoffmann CLA 2011-12-07 10:42:55 EST
Build Identifier: 20110916-0149

Hi,
in case you have databinding support using TitleAreaDialogSupport in an TitleAreaDialog you can face the problem that no correct initial error message will be shown, if there are validation errors. This problem occurs, if the target and model are in sync, in spite of having validation errors.

This is caused by the handleUIChangedMethod that only will be called on target changes. Setting the uiChanged field initially to true instead of false should solve this problem.

A workaround is to add a dummy binding like this:
dbc.bindValue(new WritableValue("test", String.class), new WritableValue());

This forces a call of handleUIChanged()

Reproducible: Always

Steps to Reproduce:
1. Create TitleAreaDialog with databinding and validators
2. Use TitleEditorDialogSupport
Comment 1 Conrad Groth CLA 2016-01-26 15:21:43 EST
That's the intented behavior; the JavaDoc of the create method in TitleAreaDialogSupport says:
... The page's error message will not be set at time of creation, ensuring that the dialog does not show an error right away. ...

This is also consistent to the WizardPageSupport and the DialogPageSupport.