pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: TableViewRowEditor or actually ListAdapter throws InstantiationException
Date Fri, 13 Jul 2012 10:40:59 GMT
Hi Thomas,
sorry for the delay for the response ... and I'm still in holidays until
next week.

I never had a problem like yours, so please in the meantime could you post
a minimal sample ?
The best would be in a jira issue (and grant the flag for usage in asf
derived work).

But yes, from what I read it seems something we can fix, but we have to
make even some unit test to not introduce strange behaviours.

Thank you,
 Il giorno 12/lug/2012 07:35, "Tomas Stenlund" <tomas.stenlund@telia.com>
ha scritto:

> 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

View raw message