Validation error if value change event failed
Hi,
F form which edits records for a particular table let's say TableA. I would like to add the following behavior to the form: On lose focus of a particular field (let's say Field1), I will retrieve from a different table TableB to check if there are records which have the same Field1 value. If yes, I'll use some of the fields from TableB to populate some of the fields of TableA. If not, I would like the field to be marked with a validation error.
I've already done the populating the fields from TableB in a valueChangeListener, but I'm not sure how to apply the validation error to the Field1.
Any advice on how to do this?
Thanks!