On Fri, Sep 11, 2009 at 3:05 PM, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > Em Fri, 11 Sep 2009 18:30:34 -0300, Bruno Santos <bitbet...@gmail.com> > IMHO, you have to write code to do that (query the database if needed)
Well that doesn't do anything else except merely lowers the probability. > intead of sending data to the database and expect it to raise erros to you. > IMHO, you should never write to your datastore in onValidate(). Interesting - I happen to think it's a great pattern to follow. You try to save and then roll back if it didn't work out - that's what the transaction management is for and Tapestry gives you a very nice way to accomplish this easily. If you only save in onSuccess you have to decide yourself whether you want to commit or abort, especially if multiple objects are involved and can't easily communicate back to the user what the error was (if he was trying to submit a form). How would you do this? Kalle --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org