New patch, may have some improvements on the first patch.
Also contains changes to SortableDataProvider and friends to take type parameter for sort property. This requires changes to DataTable TableTree etc, which I have implemented (Adding type parameter for sort property). Also touched IColumn.
I have left the DefaultDataTable, and the tree equivalent as having the sort property type of String (default implementation does not have so many API changes and type params).
I have updated wicket-devutils and wicket-examples for the changes.
I have tried to add @Override to all methods needing it in all files I have touched. (That's why there are so many changes just adding @Override).
In wicket-examples, I added generics where they were missing for that parts of the code I touched, and the classes those parts used.
I removed Removed SortableTreeProvider#setSortState() see https://issues.apache.org/jira/browse/WICKET-3580 basically, it does not make sense to modify the sort state itself, because the data/tree provider is coded to use just one type of ISortState it knows about. In fact, that implementation failed is the ISortState was not SingleSortState, and SingleSortState is mutable, so there is no need to set it.
This is obviously not a small patch, and it introduces a lot of API changes. I'm sure a lot of people will complain about the introduction of second type parameters for many of the types. That's why I left the DefaultDataTable etc as DataTable<T, String>.
I dont think we can go middle road on this one. We must either implement the generics correctly (as I hope I have done with this patch), or remove the type parameter from ISortState, and just use String.
ISortState is either parameterizable, or it isn't. We must make that decision. If it is to be parameterizable, then I think this patch is needed. If not, then we must remove the half implemented parameterization for ISortState and all its uses.