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

Bug 169988

Summary: [DataBinding]Can not validate data programmatically
Product: [Eclipse Project] Platform Reporter: drew23
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description drew23 CLA 2007-01-09 12:33:18 EST
When a Validator is added to a bind object the isValid method is called when the focus is lost from that widget(ie Text, Combo, ...)  There should also be a way to validate fields programmatically.  For examble if I have a the following code 
Binding nameBinding = 
			bind(person1EntryView.getFirstName(), 
                                new Property(
				      personPresentationModel.getName(), 
                                      "firstName"), 
				new BindSpec(null,null,
                                            new NameValidator(), null));

I should be able to call 
nameBinding.validate()
which would cause the isValid to be called in the class NameValidator.

The reason why this code would be helpful is because when the user clicks save we want to validate all of the fields and display possible errors.
Comment 1 Chris Aniszczyk CLA 2007-01-09 12:42:19 EST
moving to platform ui
Comment 2 Brad Reynolds CLA 2007-01-09 12:55:53 EST
This is coming in bug 159768.  Marking as a duplicate.

*** This bug has been marked as a duplicate of bug 159768 ***