-
1. Re: Editable Data Table with mass edit features. Unique constraint error
jskillings07 Mar 27, 2010 5:17 AM (in response to jskillings07)Link to the form:
http://3.bp.blogspot.com/4aRLuh8AWA/ST1DVAZbpdI/AAAAAAAAAZ0/Wjm5LOGejHA/s1600-h/2.gif
-
2. Re: Editable Data Table with mass edit features. Unique constraint error
jskillings07 Mar 27, 2010 5:31 AM (in response to jskillings07)The forum software is deleting some characters from the original link. Hence reposting the link again.
http://www.screencast.com/t/ZGI1YzQ5NjI
Appreciate any responses to my problem.
-
3. Re: Editable Data Table with mass edit features. Unique constraint error
corte86 Apr 6, 2010 4:38 PM (in response to jskillings07)hey, just an info...unfortunately i can't solve your problem....by the way, i'm trying to make a form really similar to your one....i select one object from a many to many relation, and in the bottom of the page, make a simple extendeddatatable with editable fields on it...the problem is that it works, but when i try to persist or merge values, my datamodel has old values.....can u post or send me the most important code parts of your form? like bean and xhtml of a row...
Thanks in advance....
-
4. Re: Editable Data Table with mass edit features. Unique constraint error
corte86 Apr 6, 2010 4:40 PM (in response to jskillings07)hey, just an info...unfortunately i can't solve your problem....by the way, i'm trying to make a form really similar to your one....i select one object from a many to many relation, and in the bottom of the page, make a simple extendeddatatable with editable fields on it...the problem is that it works, but when i try to persist or merge values, my datamodel has old values.....can u post or send me the most important code parts of your form? like bean and xhtml of a row...
Thanks in advance....
-
5. Re: Editable Data Table with mass edit features. Unique constraint error
mikebgx Apr 22, 2010 8:40 PM (in response to jskillings07)I get a similar problem in XyzHome.update() even when writing a single record to the database, if the user has edited it so as to violate the unique constraint.
I can catch a EntityExistsException or ConstraintViolationException, but in the process my entity becomes detached and subsequent operations fail badly, ie user sees the debug.seam page.
My solution could work, but I'd need to find away around the detached entity & closed session problem.
Any ideas please?
Mike Burton -
6. Re: Editable Data Table with mass edit features. Unique constraint error
mikebgx Apr 28, 2010 11:34 PM (in response to jskillings07)I found (and enhanced) an elegant solution to this problem, in case anyone's interested see: http://lazygeeks.blogspot.com/2009/03/hibernate-unique-validator-with-seam.html
Mike Burton
-
7. Re: Editable Data Table with mass edit features. Unique constraint error
ben_utzer Apr 29, 2010 10:09 AM (in response to jskillings07)Unfortunately, your solution does not handle the case when another user updates or inserts a row with the value of the unique field that has just passed validation but which has not been flushed to the database yet. Then you're left with dealing with the closed transaction, detached entities again.