How to clear errors from a form

I thought this matter to be simple but I’m having a hard time with it.

I have a form in which the user enters data, it then click save, he happens to have bad values so the form diplays error messages. fine.

Now if the user clicks on cancel, I am performing a Form.discard(), and I would like the error to just go away, but it stays on screen.

Is there a way to simply clear the errors from a form?

Thank you.


P.S. using Vaadin 6.5.0

From memory, using setComponentError(null) should remove the error.