[
https://issues.apache.org/jira/browse/WICKET-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679004#action_12679004
]
Brill Pappin commented on WICKET-2137:
--------------------------------------
I'm confused, are you saying that you want List<Foo> and not List<? extends
Foo>??
I think Olivers comment pretty much sum's up the issue and I think he's right
about the reasons for one over the other.
https://issues.apache.org/jira/browse/WICKET-2137?focusedCommentId=12678768#action_12678768
Be explicit about what the content of the list *is* which <? extends T> doesn't
do (note that now it cascades throughout my model) however List<T> is explicit
and can be widened as much as you like using real types (as in an interface or
abstract if you need to bend the unwritten rules).
There is no case I can think of where <<? extends List<? extends T>> is better.
You have exactly the same use-case resolving ability with List<T> but with a
significantly simpler syntax and a more solid coding practice (which is evident
in everyones use of ListView<T> right now).
IMO - I look at the "IModel<? extends List<? extends T>>" syntax, and think to
myself *All I wanted was a Pepsi!".
I recommend a few of us try actually working with that *double* whildcard
syntax before we make a final choice, because I'm cringing already on the hoops
I'll have to jump through, when the simplest thing actually already works well
-- not to mention the hoops the Wicket developers are going to have to jump
through to accommodate it.
My vote stays on this issue, *which is to remove the wildcard and make it so it
is like ListView*.
> Remove ? extends from constructor of DropDownChoice
> ---------------------------------------------------
>
> Key: WICKET-2137
> URL: https://issues.apache.org/jira/browse/WICKET-2137
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4-RC3
> Environment: 1.4-SNAPSHOT as of 2009-01-28
> Reporter: Brill Pappin
> Attachments: TestGenerics.java
>
>
> DropDownChoice has a generics definition of List<? extends T> in its
> constructor.
> This causes trouble with existing models that may be used in a DropDownChoice
> and is not consistant with ListView which uses <List<T>>.
> Change DropDownChoice to match the other list type components so that their
> models can be used across components.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.