not really sure what you are trying to achieve with all that below.

also you dont need to extend SortableDataProvider, you can use any dataprovider that implements ISortStateLocator.

-Igor


On 2/7/06, Frank Silbermann <[EMAIL PROTECTED]> wrote:

I'm looking at the DataView and DataTable of Wicket Extensions.  To
provide columnheader links that cause sorting, we must implement a
subclass of SortableDataProvider.

To implement a SortableDataProvider it would be really nice to have an
operation that takes in two arbitrary objects and a string (Object o1,
Object o2, String propertyName) such that:

(a) if both objects o1 and o2 have properties named by the input
propertyName string, and

(b) if these properties happen to be of the same type -- a type which
implements the Comparable interface,

(c) then the two properties named by the string are compared and the
results returned.

(If either object lacks the named property, or the corresponding
properties are not of the same type, or the type does not implement
Comparable -- then I suppose an exception can be thrown).

I probably could implement such an operation using reflection, but
unfortunately, this would require work.  Does anyone know of an existing
implementation of this kind of functionality that I could re-use --
either within the Wicket framework or elsewhere?

/Frank


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to