You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alexander Morozov <al...@gmail.com> on 2011/01/17 17:59:58 UTC

Re: Nested Forms and Multipart Fileupload Issue

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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Nested Forms and Multipart Fileupload Issue

Posted by Alexander Morozov <al...@gmail.com>.
https://issues.apache.org/jira/browse/WICKET-3555

Thanks


Martin Grigorov-4 wrote:
> 
> Create a ticket please.
> And attach the quickstart.
> 
> On Wed, Mar 23, 2011 at 12:19 PM, Stijn Maller
> &lt;stijn.maller@gmail.com&gt;wrote:
> 
> &gt; Alexander,
> &gt;
> &gt; I'm facing the same issue and I'm convinced it is a bug.
> &gt;
> &gt; When a FileUploadField in a nested form causes an error, then:
> &gt;
> &gt;   - The ErrorMessage is registered on the outer form (instead of the
> inner
> &gt;   form)
> &gt;   - The outer form's onError method is called (instead of that of the
> inner
> &gt;   form)
> &gt;   - The outer form is considered not valid
> &gt;
> &gt; This goes against https://cwiki.apache.org/WICKET/nested-forms.html
> and
> &gt; it's
> &gt; also the opposite of what happens when the FileUploadField is
> submitted
> &gt; without error. (Only the inner form's onSubmit is called)
> &gt;
> &gt; As a sidenote, I also find it a bit strange that:
> &gt; 1) the FileUploadField itself is considered valid and the error
> message is
> &gt; not registered to this component.
> &gt; 2) the onSubmit method of the AjaxButton is called instead of the
> onError
> &gt; method.
> &gt;
> &gt; Sorry, but I have not found a workaround yet.
> &gt;
> &gt; Kind regards,
> &gt; Stijn
> &gt;
> &gt;
> &gt; On 17 January 2011 17:59, Alexander Morozov
> &gt; &lt;alexander.v.morozov@gmail.com&gt;wrote:
> &gt;
> &gt; &gt;
> &gt; &gt; Hi,
> &gt; &gt;
> &gt; &gt; I have faced with another problem, related to nested forms and
> &gt; &gt; FileUploadField (wicket-1.4.15).
> &gt; &gt; The nested form have FileUploadField instance and defined
> &gt; setMaxSize(100K).
> &gt; &gt; In case of submitting thru Ajax file more than 100K, hasError()
> on the
> &gt; &gt; nested form return false. But I expect here 'true' - because of
> &gt; setMaxSize
> &gt; &gt; constraint violation. Is this expected behavior ?
> &gt; &gt;
> &gt; &gt; Quickstart is attached.
> &gt; &gt;
> &gt;
> http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
> &gt; &gt; modalproject2.zip
> &gt; &gt;
> &gt; &gt; Thanks
> &gt; &gt;
> &gt; &gt; --
> &gt; &gt; View this message in context:
> &gt; &gt;
> &gt;
> http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.html
> &gt; &gt; Sent from the Users forum mailing list archive at Nabble.com.
> &gt; &gt;
> &gt; &gt;
> ---------------------------------------------------------------------
> &gt; &gt; To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> &gt; &gt; For additional commands, e-mail: users-help@wicket.apache.org
> &gt; &gt;
> &gt; &gt;
> &gt;
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com &lt;http://jweekend.com/&gt;
> 


-----
--
http://www.linkedin.com/in/amorozov
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3402637.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Nested Forms and Multipart Fileupload Issue

Posted by Martin Grigorov <mg...@apache.org>.
Create a ticket please.
And attach the quickstart.

On Wed, Mar 23, 2011 at 12:19 PM, Stijn Maller <st...@gmail.com>wrote:

> 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
> <al...@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-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: Nested Forms and Multipart Fileupload Issue

Posted by Stijn Maller <st...@gmail.com>.
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
<al...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>