Re: [Wicket-user] Detachable resources

2006-03-01 Thread Gili
I simply do: theme = themeDAO.getById(theme.getId()); where theme is my Hibernate object. So I never run into "object with same id is already loaded" problem you described. You gave me a good idea though with regard to only storing the object ID. The thing is I have one detachable m

Re: [Wicket-user] Detachable resources

2006-02-27 Thread Johan Compagner
His model is not detached because a Resource request is not a normal page request.We don't walk over the models because we don't have components and models.johanOn 2/27/06, Maurice Marrink <[EMAIL PROTECTED]> wrote: I think he is already doing that johan, hence the question about there-attaching.A

Re: [Wicket-user] Detachable resources

2006-02-27 Thread Maurice Marrink
I think he is already doing that johan, hence the question about the re-attaching. Although there seems to be something going wrong because all models are detatched at the end of a request (unless you are nesting models and you don't propagate the detach call to the nested model). on detach the loa

Re: [Wicket-user] Detachable resources

2006-02-24 Thread Johan Compagner
personally i wouldn't keep hibernate objects in my models.Let one of the Hibernate caches do that for you down below (closer to youre data)instead of in the ui level/models. On 2/23/06, Gili <[EMAIL PROTECTED]> wrote: Ah! Thank you :)You seemed to have missed my question regarding c

Re: [Wicket-user] Detachable resources

2006-02-23 Thread Gili
Ah! Thank you :) You seemed to have missed my question regarding clustering. Do I need to fully detach LoadableDetachableModel on resource close or is it sufficient to reattach the Hibernate objects to a new Session on the next request? Will the latter cause problems in clustering en

Re: [Wicket-user] Detachable resources

2006-02-23 Thread Johan Compagner
Iresourcestream.close() On 2/23/06, Gili <[EMAIL PROTECTED]> wrote:    I meant I haved a Resource that gets its data from the database. So Iwrapped my Hibernate object in a LoadableDetachableModel. Basically what I am noticing is this:1) First request comes in2) New Hibernate session is opened3

Re: [Wicket-user] Detachable resources

2006-02-23 Thread Gili
I meant I haved a Resource that gets its data from the database. So I wrapped my Hibernate object in a LoadableDetachableModel. Basically what I am noticing is this: 1) First request comes in 2) New Hibernate session is opened 3) Resource.getData() gets invoked 4) LoadableDetachableModel.att

Re: [Wicket-user] Detachable resources

2006-02-23 Thread Johan Compagner
 i guess you are now talking about a Component that is directly its own Resource Streamer? of do you have Shared Resources with a detachablemodel? That would be strange because that doesn't make anysense for wicket (we don't attach/detach it)   But for a component and a model impl that has the reso

[Wicket-user] Detachable resources

2006-02-23 Thread Gili
Hi, Currently resources have no concept of the beginning or end of request because most resources have no need for them. Problem is, if you have a resource that is backed up by a DetachableModel there needs to be a way to tell the model when to attach or detach itself. Currently the only saf