Hi all !

I have a nested form inside a root one, both are multipart. I want to cutomize 
the onFileUploadException(..) method of the nested form in order to trace this 
event. So I overrided the method of my nested form instance, typically to get a 
trace of file size limit exceeded.
But Wicket calls the onFileUploadException(..) on the root form, not on the 
nested one, so my overrided code doesn't apply.
I found that it's due to the AjaxformSubmitBehavior which calls 
onFormSubmitted(..) on the root form, here's the code :
protected void onEvent(final AjaxRequestTarget target)
{
                getForm().getRootForm().onFormSubmitted(new 
IAfterFormSubmitter()
                {
...

So I used my own behavior with the modified line (getRootForm() removed) :
getForm().onFormSubmitted(new IAfterFormSubmitter()

and it works : the onFileUploadException(..) of the nested form is called, not 
this of the root form.

I couldn't find another way to make it work, did I miss something ?

I think that Wicket should call onFileUploadException(..) on its nested forms 
so I think the actual behavior is a bug, am I wrong ? (I can fill in a bug if 
necessary)


I'm using Wicket 1.5.10.

Thanks !

Reply via email to