[
https://issues.apache.org/jira/browse/WICKET-4535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jesse Long updated WICKET-4535:
-------------------------------
Attachment: WICKET-4535-1.patch
WICKET-4535-1.patch
Initial work on adding generics for the Sort APIs. I have made all sort fields
must extends Serializable, which makes sense to me.
I have made ISortableDataProvider and ISortableTreeProvider implement
ISortableStateLocator<String> (ie. String type sort properties by default). We
must introduce a new type parameter to these classes to allow arbitrary sort
fields. I would recommend it.
I have not fxes HeadersToolbar and AjaxFallbackHeadersToolbar, but changing
these requires IColumn to change as well, allowing IColumn to return the
generic sort property type in getSortProperty(). I would actually recommend
these changes, but it should probably be debated first.
> Inconsistent use of generics in sorting APIs
> --------------------------------------------
>
> Key: WICKET-4535
> URL: https://issues.apache.org/jira/browse/WICKET-4535
> Project: Wicket
> Issue Type: Bug
> Components: wicket-extensions
> Affects Versions: 6.0.0-beta1
> Reporter: Jesse Long
> Priority: Minor
> Attachments: WICKET-4535-1.patch
>
>
> The Sort APIs use very generics inconsistently. Classes like
> SortableDataProvider, ISortState, SortParam etc do not all uniformly cater
> for sort properties other than string. There is a lot of unchecked casting,
> which is not really required, if generics were used across the board.
> Fixing this will probably cause API changes for 6.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira