Form Validation

i got a question about form validation. I have a set of validators attached to the form fields.
I have a button to commit the form: ‘new Button(“Commit”, form, “commit”))’.
After commiting every invalid field is highlited and when i mouseover the invalid field i get a propper
error message. The commit button is highlited also. When i mouseover the button the tooltip shows
me the hole stacktrace of a InvalidValueException. First i dont want the button to be highlited and also the stacktrace
in the tooltip is not what i want. Second, when i correct the field values and click commit again then the error indicators of the fields disappear like expected but the button is still marked with the error indicator. Thats confusing.
I am sure that i did something wrong but i dont know what or where.
I allready searched the book for advice without success.Could someone please give me hint or point me to the documentation.

By the way. Last week we had a little presentation. Everything worked just fine; Thanx for the framework.



In your case, I think it would be easiest to just change your code to use a proper ClickListener for the button:

new Button("Commit", new Button.ClickListener() {           
   public void buttonClick(ClickEvent event) {
      // TODO form.commit(), handle potential exception  

Best Regards,

Glad you find it useful. When can we add your project(s) to
the list
? :slight_smile:

Yeah, right. Catching InvalidValue is the solution. Thx.