[ 
https://issues.apache.org/jira/browse/WICKET-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grzegorz Paniw updated WICKET-2770:
-----------------------------------

    Description: 
ChoiceFilteredPropertyColumn contains filterChoices which was declared as 
IModel<List<? extends Y>>. IMHO this is wrong way. Should be IModel<List<Y>>.
Why? Now if we want cast from model (f.e. HibernateListModel with type 
Category) it's impossible without warnings. We must cast directly to IModel and 
we can't cast to f.e. IModel<Category> or IModel<? extends Category> 
(compilation error). See below:
(IModel) new HibernateListModel<Category>(Category.class).

So the better way is put IModel<List<Y>> declaration.

Of course I look forward to comments to this issue. This is my first 
application so please be tolerant :)

  was:
ChoiceFilteredPropertyColumn contains filterChoices which was declared as 
IModel<List<? extends Y>>. IMHO this is wrong way. Should be IModel<List<Y>>.
Why? Now if we want cast from model (f.e. HibernateListModel with type 
Category) it's impossible without warnings. We must cast directly to IModel and 
we can't cast to f.e. IModel<Category> or IModel<? extends Category> 
(compilation error). See below:
(IModel) new HibernateListModel<Category>(Category.class).

So the better way is put IModel<List<Y>> declaration.

Of course I look forward to comments to this issue.


> ChoiceFilteredPropertyColumn
> ----------------------------
>
>                 Key: WICKET-2770
>                 URL: https://issues.apache.org/jira/browse/WICKET-2770
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.4.7
>            Reporter: Grzegorz Paniw
>            Priority: Trivial
>
> ChoiceFilteredPropertyColumn contains filterChoices which was declared as 
> IModel<List<? extends Y>>. IMHO this is wrong way. Should be IModel<List<Y>>.
> Why? Now if we want cast from model (f.e. HibernateListModel with type 
> Category) it's impossible without warnings. We must cast directly to IModel 
> and we can't cast to f.e. IModel<Category> or IModel<? extends Category> 
> (compilation error). See below:
> (IModel) new HibernateListModel<Category>(Category.class).
> So the better way is put IModel<List<Y>> declaration.
> Of course I look forward to comments to this issue. This is my first 
> application so please be tolerant :)

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