You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Eelco Hillenius (JIRA)" <ji...@apache.org> on 2007/10/16 07:41:50 UTC
[jira] Resolved: (WICKET-300) validate.getValue() on a
FileUploadField returns filename instead of a handle to the fileuploadfield
[ https://issues.apache.org/jira/browse/WICKET-300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eelco Hillenius resolved WICKET-300.
------------------------------------
Resolution: Invalid
2.0 is discontinued
> validate.getValue() on a FileUploadField returns filename instead of a handle to the fileuploadfield
> ----------------------------------------------------------------------------------------------------
>
> Key: WICKET-300
> URL: https://issues.apache.org/jira/browse/WICKET-300
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 2.0 branch (discontinued)
> Reporter: Marco Behler
>
> public class ImageUploadValidator extends AbstractValidator<FileUploadField> {
> ....
> ......
> protected void onValidate(IValidatable<FileUploadField> validatable) {
> ---> FileUploadField fu = validatable.getValue();
> ClassCastException gets thrown, as validatable.getValue() returns the filename of the to_be_uploaded file. Tracing it back to the FormComponent.class
> public T getValue()
> {
> return FormComponent.this.getConvertedInput();
> }
> returns - of course - the getConvertedInput, which is the filename.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.