Alexander,

I'm facing the same issue and I'm convinced it is a bug.

When a FileUploadField in a nested form causes an error, then:

   - The ErrorMessage is registered on the outer form (instead of the inner
   form)
   - The outer form's onError method is called (instead of that of the inner
   form)
   - The outer form is considered not valid

This goes against https://cwiki.apache.org/WICKET/nested-forms.html and it's
also the opposite of what happens when the FileUploadField is submitted
without error. (Only the inner form's onSubmit is called)

As a sidenote, I also find it a bit strange that:
1) the FileUploadField itself is considered valid and the error message is
not registered to this component.
2) the onSubmit method of the AjaxButton is called instead of the onError
method.

Sorry, but I have not found a workaround yet.

Kind regards,
Stijn


On 17 January 2011 17:59, Alexander Morozov
<alexander.v.moro...@gmail.com>wrote:

>
> Hi,
>
> I have faced with another problem, related to nested forms and
> FileUploadField (wicket-1.4.15).
> The nested form have FileUploadField instance and defined setMaxSize(100K).
> In case of submitting thru Ajax file more than 100K, hasError() on the
> nested form return false. But I expect here 'true' - because of setMaxSize
> constraint violation. Is this expected behavior ?
>
> Quickstart is attached.
> http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
> modalproject2.zip
>
> Thanks
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to