Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-25 Thread Johan Compagner
Happy NewYear! On 2/25/07, Matthew Kwong [EMAIL PROTECTED] wrote: Sorry guys, I was in Chinese new year vacation and out of the town without any internet connection. Anyway, Iman is right, it is the model in palette that's causing this exception. Thank you so much :) Matthew Iman

Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-24 Thread Matthew Kwong
Sorry guys, I was in Chinese new year vacation and out of the town without any internet connection. Anyway, Iman is right, it is the model in palette that's causing this exception. Thank you so much :) Matthew Iman Rahmatizadeh wrote: Matthew, the line where you create a palette object, I

Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-19 Thread karthik Guru
Personally I have have run into lot of issues with OpenSessionInViewFilter pattern, so much so that I decided to take it off - At least the app now works as 'I expect'. But then am not an hibernate expert. The standard solution is to use Session.merge() Doesn't merge recreate the entity if

Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-19 Thread Iman Rahmatizadeh
Matthew, the line where you create a palette object, I see you're using Model instead of a Loadable model, what does the getDataStoreRoles() do ? Does it load the DataStoreUser object ? Models are normally dangerous to use with persistent objects, as they usually hold on to the instance during

Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-18 Thread Ryan Holmes
org.hibernate.NonUniqueObjectException is a really common problem. My guess is that the DataStoreUser is being loaded once to pass it into the page constructor and again by the LoadableDetachableModel within the same Hibernate session. Same persistent object loaded into two separate

Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-18 Thread Ryan Holmes
I should clarify that last paragraph: I don't know Wicket well enough to be sure you haven't found a bug and of course I don't know your code. I've just run into this often enough in Hibernate to make an educated guess. Let us know how it works out. -Ryan On Feb 18, 2007, at 2:08 AM, Ryan

Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-18 Thread Eelco Hillenius
Basically, while it is great that you can work directly with hibernate objects in Wicket components, there are a couple of dangers to it as well. Especially when you use with a filter that opens and closes a transaction on every (Wicket) request and/or you have implicit transactions turned on, you

Re: [Wicket-user] LoadableDetachableModel in form processing

2007-02-17 Thread Eelco Hillenius
Hi, Last time I asked how to use chain in CompoundPropertyModel with LoadableDetachableModel, it worked since my page has no form (no submit). This time, I make another page and try to use the chain again, and hibernate throws org.hibernate.NonUniqueObjectException when I submit the form.

[Wicket-user] LoadableDetachableModel in form processing

2007-02-10 Thread Matthew Kwong
Hi fellows, Last time I asked how to use chain in CompoundPropertyModel with LoadableDetachableModel, it worked since my page has no form (no submit). This time, I make another page and try to use the chain again, and hibernate throws org.hibernate.NonUniqueObjectException when I submit the