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 <[email protected]>
A: [email protected]
Inviato: Mercoledì 22 luglio 2009, 13:32:29
Oggetto: Re: Different DataContext

Hello Emanuele,

Thanks for your reply.

2009/7/22 Emanuele Maiarelli <[email protected]>:

>  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/



      

Reply via email to