[
https://issues.apache.org/jira/browse/WICKET-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969443#action_12969443
]
Martin Grigorov commented on WICKET-3242:
-----------------------------------------
This was tried for Wicket 1.4 but the outcome wasn't very good -
creation/instantiation of components became too verbose.
For more details see:
- https://cwiki.apache.org/WICKET/generics.html
-
https://cwiki.apache.org/WICKET/migrating-to-wicket-14.html#MigratingtoWicket1.4-Component.getModel%2528%2529andfriendsrenamedtogetDefaultModel%2528%2529andfriends
> Component and some derived classes lose the Model type information, not
> parameterized by type
> ---------------------------------------------------------------------------------------------
>
> Key: WICKET-3242
> URL: https://issues.apache.org/jira/browse/WICKET-3242
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5-M3
> Environment: All
> Reporter: Richard Emberson
>
> Component and some derived classes (like MarkupContainer) are not
> parameterized
> by the type of the Model. As a result, methods such as:
> getDefaultModelObject
> and
> getDefaultModel
> rather than being typed return Object and IModel<?>.
> Code that uses these methods must then ferret out the type which, IMHO,
> should not be the case.
> Please take advantage of the strong typing that generics provide in the
> Componet
> base classes. User code would be safer and cleaner if they did not have to
> have the instanceof tests and casts.
> Better to delay 1.5 than to only partially support parameterized types.
> Thanks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.