I like the new feature of 4.0 tabular form validations a lot. If you create a validation on a column, you will get the highlighting and focus out of the box. Based on that, I created a small example for those cases where you can't use the standard validations and still need to do it by hand. It works the similar way except that the highlighting will only work after clicking the link in the message. You can find that example in my Demo Application.