Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
1.5-RC2
-
None
-
all
Description
Can we please drop the setSortState() method of org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator ? It's not used by anything at all, and just messes my data provider up.
My ISortableDataProvider expects my custom ISortState, which is fine, except that I must allow someone to setSortState() passing me a generic ISortState, which will not work with my Data Provider. I think this setSortState() is unnecessary and should be dropped.
<martin-g> the idea is that you can change the sortState after construction
yes, but ISortState has a setPropertySortOrder(), which allows it to be mutable, hence no need to provice a new ISortState
My use case is this: I have a MultiColumnSortState, which maintains a List of SortParams, based on the sequence of setPropertySortOrder() calls. My ISortableDataProvider can only intelligently work with this one ISortState it is designed to work with.
Setting another arbitrary ISortState will make no sense. In fact, look at the only ISortableDataProvider supplied with Wicket source: org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider. It too can only accept the specific ISortState it expects. That ISortState is also mutable, so does not actually need setting at all.