Why do you need it "detached all the way"? On Thu, May 8, 2008 at 4:56 PM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote: > > I have some questions on detached models for Wicket > > Let's say I create a detached model like this > > IModel detachedModel = new LoadableDetachableModel(){ > protected Object load(){ > return ..... spring injected hibernate dao.... lets say Categories > } > }; > > So now I'll have a detached model. > > now I'll use a ListView to populate data from the detachedModel > > add( new ListView( "myId" , detachedModel ){ > public void populateItem( ListItem item) { > final Category category = (Category) item.getModelObject(); > > item.add( new Link( "link" ){ > public void onClick(){ > setResponsePage( new CategoryPage( category ) ); > } > } ); > } > }); > > I hope this is right. This is obviously from the top of my head. My question > is. > When In my CategoryPage after a user has clicked the link in the list item > is the Category that I got > from a detached model detached? Or is it a hibernate proxy? If so, how can I > get it detached all the way? > > > Igor wrote something about a detached DataProvider. Do I need to use > DataProvider to get detached hibernate pojos? I would really want to know > how to do this. Right now, I'm in spagetti code with DAOS that throws > LazyLoading exceptions and Wicket pages that does the same. > > > -- > View this message in context: > http://www.nabble.com/Detached-models-tp17136199p17136199.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]