[ 
https://issues.apache.org/jira/browse/WICKET-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521499
 ] 

Jean-Baptiste Quenot commented on WICKET-300:
---------------------------------------------

Can you still reproduce the issue?  It mentions 2.0 branch (discontinued).  
Could you test with Wicket 1.3.0 beta 2?  Thanks!

> 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.

Reply via email to