You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexander Morozov (JIRA)" <ji...@apache.org> on 2011/03/24 15:23:05 UTC
[jira] [Created] (WICKET-3555) hasError() returns false on nested
form with FileUploadField and defined max file upload size
hasError() returns false on nested form with FileUploadField and defined max file upload size
---------------------------------------------------------------------------------------------
Key: WICKET-3555
URL: https://issues.apache.org/jira/browse/WICKET-3555
Project: Wicket
Issue Type: Bug
Components: wicket-core
Affects Versions: 1.4.16
Reporter: Alexander Morozov
Attachments: modalproject2.zip
The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3555) hasError() returns false on nested
form with FileUploadField and defined max file upload size
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13013269#comment-13013269 ]
Igor Vaynberg commented on WICKET-3555:
---------------------------------------
what if there are two nested forms and each contains a fileuploadfield? which one is marked inerror()?
> hasError() returns false on nested form with FileUploadField and defined max file upload size
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3555
> URL: https://issues.apache.org/jira/browse/WICKET-3555
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.16
> Reporter: Alexander Morozov
> Assignee: Igor Vaynberg
> Attachments: modalproject2.zip
>
>
> The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
> See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3555) hasError() returns false on nested
form with FileUploadField and defined max file upload size
Posted by "Martin Grigorov (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173088#comment-13173088 ]
Martin Grigorov commented on WICKET-3555:
-----------------------------------------
Stein, create a new ticket with a quickstart. With a patch even better!
> hasError() returns false on nested form with FileUploadField and defined max file upload size
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3555
> URL: https://issues.apache.org/jira/browse/WICKET-3555
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.16
> Reporter: Alexander Morozov
> Assignee: Igor Vaynberg
> Attachments: modalproject2.zip
>
>
> The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
> See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (WICKET-3555) hasError() returns
false on nested form with FileUploadField and defined max file upload size
Posted by "Stein Desmet (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173074#comment-13173074 ]
Stein Desmet edited comment on WICKET-3555 at 12/20/11 11:12 AM:
-----------------------------------------------------------------
I still have this problem in wicket 1.4.18. The issue actually comes from AjaxFormSubmitBehaviour (which is used in AjaxButton to submit forms), doing the following in onEvent():
getForm().getRootForm().onFormSubmitted();
but then does:
if (!getForm().hasError())
{
onSubmit(target);
}
However, if the file size was to big, only the root form will receive an error status, and not the submitting form (see Form.onFileUploadException() ).
was (Author: sgdesmet):
I still have this problem in wicket 1.4.18. The issue actually comes from AjaxFormSubmitBehaviour, which does in onEvent():
getForm().getRootForm().onFormSubmitted();
but then does:
if (!getForm().hasError())
{
onSubmit(target);
}
However, if the file size was to big, only the root form will receive an error status, and not the submitting form (see Form.onFileUploadException() ).
> hasError() returns false on nested form with FileUploadField and defined max file upload size
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3555
> URL: https://issues.apache.org/jira/browse/WICKET-3555
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.16
> Reporter: Alexander Morozov
> Assignee: Igor Vaynberg
> Attachments: modalproject2.zip
>
>
> The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
> See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3555) hasError() returns false on nested
form with FileUploadField and defined max file upload size
Posted by "Stein Desmet (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173074#comment-13173074 ]
Stein Desmet commented on WICKET-3555:
--------------------------------------
I still have this problem in wicket 1.4.18. The issue actually comes from AjaxFormSubmitBehaviour, which does in onEvent():
getForm().getRootForm().onFormSubmitted();
but then does:
if (!getForm().hasError())
{
onSubmit(target);
}
However, if the file size was to big, only the root form will receive an error status, and not the submitting form (see Form.onFileUploadException() ).
> hasError() returns false on nested form with FileUploadField and defined max file upload size
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3555
> URL: https://issues.apache.org/jira/browse/WICKET-3555
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.16
> Reporter: Alexander Morozov
> Assignee: Igor Vaynberg
> Attachments: modalproject2.zip
>
>
> The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
> See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3555) hasError() returns false on nested
form with FileUploadField and defined max file upload size
Posted by "Stijn Maller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012924#comment-13012924 ]
Stijn Maller commented on WICKET-3555:
--------------------------------------
Igor,
OK, I get why it is registered on the form and not the field, but could you explain why it needs to be the ROOT form and not simply the form that contains the upload?
Should nested forms suddenly start behaving different just because they contain an upload field?
https://cwiki.apache.org/WICKET/nested-forms.html
Kind regards,
Stijn
> hasError() returns false on nested form with FileUploadField and defined max file upload size
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3555
> URL: https://issues.apache.org/jira/browse/WICKET-3555
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.16
> Reporter: Alexander Morozov
> Assignee: Igor Vaynberg
> Attachments: modalproject2.zip
>
>
> The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
> See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3555) hasError() returns false on nested
form with FileUploadField and defined max file upload size
Posted by "Alexander Morozov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Morozov updated WICKET-3555:
--------------------------------------
Attachment: modalproject2.zip
> hasError() returns false on nested form with FileUploadField and defined max file upload size
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3555
> URL: https://issues.apache.org/jira/browse/WICKET-3555
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.16
> Reporter: Alexander Morozov
> Attachments: modalproject2.zip
>
>
> The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
> See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3555) hasError() returns false on nested
form with FileUploadField and defined max file upload size
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-3555.
-----------------------------------
Resolution: Won't Fix
Assignee: Igor Vaynberg
when an upload exceeds its size it is always the root form that is marked in error. this happens because the max size defined is for the entire form and not the individual fileuploadfield.
> hasError() returns false on nested form with FileUploadField and defined max file upload size
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3555
> URL: https://issues.apache.org/jira/browse/WICKET-3555
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.16
> Reporter: Alexander Morozov
> Assignee: Igor Vaynberg
> Attachments: modalproject2.zip
>
>
> The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation.
> See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira