Hi,

I'm using Pivot 2.0.2 and have come across something which I would gladly have some good suggestions around.

In a TableView I have a tableDataKey that points to a "get" method that is implemented by the the object I load into the form. The get method returns a ListAdapter wrapping a list of objects (Apache Cayenne ToManyList). What I have seens is that the list I wrap up doesn't have an empty constructor, causing the ListAdapter to throw an instantiantionexception when using the remove(in,in) method since it does a getClass().newInstance of that list.

The ListView works perfectly, but as soon as I have a TableSortViewListener that adds a comparator to the tableData it behaves differently. The endEdit method of the TableViewRowEditor then does a remove described above causing the exception.

So, is there a good way of doing this differently that does not cause this ? I got it to work when I made a new "real" pivot list from the cayenne ToManyList instead of wrapping up the cayenne ToManyList with the ListAdapter. But I think that is kind of "ugly" since I do got the ListAdapter specifically for this purpouse and the ToManyList implements a List and is also automatically generated by Cayenne for me.

Anyone come across something similar ?

Cheers,

Tomas


Reply via email to