On Tue, 19 Jun 2012 17:19:47 +0300 Martin Grigorov <[email protected]> wrote:
> Looks OK to me. > > Just a few minor things: > > 1) I prefer on(Before|After)FormSubmit than > onSubmit(Before|After)Form. Sounds more clear to me I had those first, but it seemed odd - "onBeforeFormSubmit" sounds like it happens before the submit, like onBeforeRender happens before render. onSubmitBeforeForm is clearly a part of the submit, just invoked before the form is called. > 2) I see you removed 'abstract' from the methods. > I agree that it will be worse if I have to override both new methods > for every Link/Button I use. But I also remember that in earlier > versions of Wicket #onSubmit() was abstract and #onError() wasn't and > some people complained about this. I think #onError() became abstract > for 1.5.x. > We just need to decide which way to go here. With the two new methods I don't think any of them should be abstract. Almost all buttons will only need one of them. In our application the abstract onError added a lot of noise that we didn't need, and this would triple it. Thanks for looking over it! Carl-Eric
