I think the problem is there:
DataContext mycontext = Databinder.getContext();
person = ObjectFactory.getInstance().getPerson(parameters.getInt("personid"),
mycontext);
'mycontext' isn't the same context of the one ObjectFactory is using , u should share the same context between
Wicket and your Singleton.
I hope this will solve,
________________________________
Da: Reinout van Schouwen <reinou..mail.com>
A: user@cayenne.apache.org
Inviato: Mercoledì 22 luglio 2009, 13:32:29
Oggetto: Re: Different DataContext
Hello Emanuele,
Thanks for your reply.
2009/7/22 Emanuele Maiarelli <evvdra..ahoo.it>:
> i'm not an apache Wicket expert, but the Exception its obiusvly casted by
> the fact that ur application is casting objects into different DataContexts.
Yes, but I have no idea how that could happen.
> What happen if u steps into
(...)
This part of the code works fine. It's the 'else' case that causes the
exception.
Regards,
--
Reinout van Schouwen
http://vanschouwen.info/
This archive was generated by hypermail 2.0.0 : Wed Jul 22 2009 - 07:43:07 EDT