[
https://issues.apache.org/jira/browse/WICKET-3494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004380#comment-13004380
]
Igor Vaynberg commented on WICKET-3494:
---------------------------------------
what you are suggesting will not compile because of
Name clash: The method setDefaultModel(IModel<List<FileUpload>>) of type
FileUploadField has the same erasure as setDefaultModel(IModel<?>) of type
MarkupContainer but does not override it
i removed the method altogether.
> org/apache/wicket/markup/html/form/upload/MultiFileUploadField
> setDefaultModel type error
> -----------------------------------------------------------------------------------------
>
> Key: WICKET-3494
> URL: https://issues.apache.org/jira/browse/WICKET-3494
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC2
> Environment: all
> Reporter: Richard Emberson
> Priority: Minor
>
> If one worries about correct typing (which I am forced to do), then the
> setDefaultModel method for
> org/apache/wicket/markup/html/form/upload/MultiFileUploadField
> should be:
> public FileUploadField setDefaultModel(IModel<?> model) {
> return (FileUploadField)super.setDefaultModel(model);
> if (model == null)
> super.setDefaultModel(null)
> else
> super.setDefaultModel(new
> ListModel<FileUpload>(Arrays.asList(model.getObject())));
> return this;
> }
> Just like the constructor.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira