LoadableDetachableModel load() - Listview onclick()

2011-11-15 Thread bilgisever
Simpy, I have a listview and a LoadableDetachableModel which is listview Model. Listview has a link to populate. This Link has onclick event. The event is update the query for LoadableDetachableModel to load data and list them in listview. But the problem is that event

AW: LoadableDetachableModel load() - Listview onclick()

2011-11-15 Thread Sven Meier
. November 2011 13:26 An: users@wicket.apache.org Betreff: LoadableDetachableModel load() - Listview onclick() Simpy, I have a listview and a LoadableDetachableModel which is listview Model. Listview has a link to populate. This Link has onclick event. The event is update the query

Re: AW: LoadableDetachableModel load() - Listview onclick()

2011-11-15 Thread bilgisever
.nabble.com/LoadableDetachableModel-load-Listview-onclick-tp4042769p4043238.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e

AW: AW: LoadableDetachableModel load() - Listview onclick()

2011-11-15 Thread Sven Meier
...@hotmail.com] Gesendet: Dienstag, 15. November 2011 15:57 An: users@wicket.apache.org Betreff: Re: AW: LoadableDetachableModel load() - Listview onclick() Yes, the link is a part of the listview. ListView : ListViewAstPlans breadList = new ListViewAstPlans(breadList,loadModel

Re: LoadableDetachableModel in Listview

2008-12-09 Thread Ned Collyer
jwcarman wrote: I like shadow much better. He was an awesome hedgehog hey ;) -- View this message in context: http://www.nabble.com/LoadableDetachableModel-in-Listview-tp20894115p20926225.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: LoadableDetachableModel in Listview

2008-12-09 Thread Ned Collyer
: http://www.nabble.com/LoadableDetachableModel-in-Listview-tp20894115p20926367.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: LoadableDetachableModel in Listview

2008-12-09 Thread James Carman
/LoadableDetachableModel-in-Listview-tp20894115p20926225.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

Re: LoadableDetachableModel in Listview

2008-12-08 Thread Bruno Cesar Borges
Put your object into user's session, just like a shopping chart. :-) -Original Message- From: Benjamin Ernst [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2008 10:06 AM To: users@wicket.apache.org Subject: LoadableDetachableModel in Listview Hi everybody, I have a little Problem

Re: LoadableDetachableModel in Listview

2008-12-08 Thread Benjamin Ernst
Hi James, thanks for your help. I think shadow models could work, when I only access non-lazy fields. Otherwise I would get a LazyInitializationException. Or what do you exactly mean by shadow models? - Benjamin On Mon, Dec 8, 2008 at 1:32 PM, James Carman [EMAIL PROTECTED]wrote: Would

LoadableDetachableModel in Listview

2008-12-08 Thread Benjamin Ernst
Hi everybody, I have a little Problem with LDMs: I have a page with a ListView and for each item in the ListView the user can open a modalWindow to edit the item. My Problem is, that I don't want to persist the item to the DB from the modalWindow. Only after the User confirms the changes in the

Re: LoadableDetachableModel in Listview

2008-12-08 Thread James Carman
Sorry for the delay. A shadow model basically grabs the actual model's value in the beginning and caches it. You actually edit the shadowed model. Then, when you're done with all of your edits you call commit on all of your shadow models to write back into the originals. So, I don't think

Re: LoadableDetachableModel in Listview

2008-12-08 Thread Daan van Etten
Hi James, How does this work with a Hibernate-managed object? Did you test it with Hibernate? Op 8 dec 2008, om 19:45 heeft James Carman het volgende geschreven: Sorry for the delay. A shadow model basically grabs the actual model's value in the beginning and caches it. You actually edit

Re: LoadableDetachableModel in Listview

2008-12-08 Thread James Carman
It would work the same way, since it grabs its stuff up-front. Behind the scenes, you use a LDM as the actual model. On Mon, Dec 8, 2008 at 1:56 PM, Daan van Etten [EMAIL PROTECTED] wrote: Hi James, How does this work with a Hibernate-managed object? Did you test it with Hibernate? Op 8

Re: LoadableDetachableModel in Listview

2008-12-08 Thread Erik van Oosten
So I guess you're not levering the optimistic locking of Hibernate. Regards, Erik. James Carman wrote: It would work the same way, since it grabs its stuff up-front. Behind the scenes, you use a LDM as the actual model. On Mon, Dec 8, 2008 at 1:56 PM, Daan van Etten [EMAIL PROTECTED]

Re: LoadableDetachableModel in Listview

2008-12-08 Thread James Carman
There are many ways to skin a cat. LDMs pretty much throw optimistic locking out the window, agreed (since they just go get a fresh copy of the object each time typically)? So, if you want to use optimistic locking, then you shouldn't be using LDMs in the first place. On Mon, Dec 8, 2008 at

Re: LoadableDetachableModel in Listview

2008-12-08 Thread Martijn Dashorst
Why? There's nothing keeping you from storing the version too, and checking that against the newly loaded entity... The question is... what do you do when the version is modified from your original object? Martijn On Mon, Dec 8, 2008 at 9:11 PM, James Carman [EMAIL PROTECTED] wrote: There are

Re: LoadableDetachableModel in Listview

2008-12-08 Thread James Carman
Somehow you have to reset the cached version value (assume you'd use a validator for this I guess), since it's not the same as the one in the db, right? On Mon, Dec 8, 2008 at 3:34 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: The user doesn't have to refresh, because she already gets the new

Re: LoadableDetachableModel in Listview

2008-12-08 Thread Martijn Dashorst
something like: protected Object load() { Entity entity = ...; if(entity.getVersion() != version) { Session.get().warn(Someone else modified the foo in the database, please review these changes and re-enter your data.); version = entity.getVersioni();

Re: LoadableDetachableModel in Listview

2008-12-08 Thread James Carman
Using this, you have to make sure this model gets reset on form submit, too, right? With this, you have to make sure you reset the model's cached version value upon successful form submit, too, right? On Mon, Dec 8, 2008 at 4:13 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: something like:

Re: LoadableDetachableModel in Listview

2008-12-08 Thread James Carman
Does anyone use a custom validator to implement this type of stuff? I'm not crazy about a model implementing this functionality, especially during a get operation. Also, your model has to be aware of your view (the call to the form's clearInput() method). I don't know. Something about it just

Re: LoadableDetachableModel and ListView - changes in the list items is lost when saving

2008-03-27 Thread lizz
in context: http://www.nabble.com/LoadableDetachableModel-and-ListView---changes-in-the-list-items-is-lost-when-saving-tp16301505p16301505.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e

LoadableDetachableModel and ListView - changes in the list items is lost when saving

2008-03-26 Thread lizz
and reloaded before I save the list? -- View this message in context: http://www.nabble.com/LoadableDetachableModel-and-ListView---changes-in-the-list-items-is-lost-when-saving-tp16301505p16301505.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: LoadableDetachableModel and ListView - changes in the list items is lost when saving

2008-03-26 Thread Nick Heudecker
the save button the changed values has been reset back to the original value. Why is the detachable model being detached and reloaded before I save the list? -- View this message in context: http://www.nabble.com/LoadableDetachableModel-and-ListView---changes-in-the-list-items-is-lost-when