Validations are a huge part of any software development. We need to validate that the data being entered from the UI is correct i.e of correct type or we are not leaving a notNull/notEmpty fields to be blank. There are so many ways to fulfill these requirements and we can have UI level validations or persistence level validations.

I'm trying to re-use a form as an edit form if its posted with GET parameters. The form works fine for both add and edit. The problem is that if I delete an entry, the next time I try to use the form as an add form, it throws an error (below).

Answer: It looks like you are trying to reuse the same Home object. Don't, get a new one (e.g. start a new conversation).
Notes: Watch out for s:buttons propagation, must be set to "none", you should also pass a parameter with no value to be set for entity Id in the Home object (or action), eg. <f:param name="myClassId" />, public class MyClassHome extends EntityHome<MyClass> { public setMyClassId(Integer id) { this.setId(id); } …

Question: What is the technique for making the previous (to the bad Commit) revision the HEAD revision? I've seen discussion here on SO for doing this for 1 file, but we'd like to make it like that last commit never happened. Any ideas?

ANSWER: Using TortoiseSVN, you can show log, check previous revision (n-1), in context menu choose Revert to this revision and commit the changes (it will becomes n+1, where n is current bad head)

The cleanest way would be to undo changes

You can use svn merge to “undo” the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference. (You can do this by specifying –revision 303:302, or by an equivalent –change -303.)