Re: Trouble updating ListEditor with a detachable model

2016-04-12 Thread Francois Meillet
Do you use session.save(object) ?
Should be session.saveOrUpdate(object) or session.update(object)

François 








Le 11 avr. 2016 à 23:34, ChambreNoire <a...@tentelemed.com> a écrit :

> Hi,
> 
> I'm trying to use the ListEditor component from the Wicket in Action blog
> (). I'm giving it a PropertyModel that points to "parent.children" where
> parent is a LDM that loads a 'parent' from the database. It displays
> properly however when I update the TextFields added to the ListItems and try
> to save the parent, I get the following persistence exception
> "org.hibernate.NonUniqueObjectException: a different object with the same
> identifier value was already associated with the session".
> 
> I get the feeling that this is due to the way the ListEditor handles the
> model update. What would be required to adapt it to my usage?
> 
> Many Thanks,
> 
> CN
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Trouble-updating-ListEditor-with-a-detachable-model-tp4674272.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-mail: users-h...@wicket.apache.org
> 



Trouble updating ListEditor with a detachable model

2016-04-11 Thread ChambreNoire
Hi,

I'm trying to use the ListEditor component from the Wicket in Action blog
(). I'm giving it a PropertyModel that points to "parent.children" where
parent is a LDM that loads a 'parent' from the database. It displays
properly however when I update the TextFields added to the ListItems and try
to save the parent, I get the following persistence exception
"org.hibernate.NonUniqueObjectException: a different object with the same
identifier value was already associated with the session".

I get the feeling that this is due to the way the ListEditor handles the
model update. What would be required to adapt it to my usage?

Many Thanks,

CN

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Trouble-updating-ListEditor-with-a-detachable-model-tp4674272.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-mail: users-h...@wicket.apache.org



Listeditor

2009-11-30 Thread Steffen Dienst

Hello friendly folks,

I'm experimenting with the ListEditor as introduced at  
http://wicketinaction.com/2008/10/building-a-listeditor-form-component/.
After implementing a move up/down functionality (see  
http://gist.github.com/245506), I'm getting problems as soon as I add  
TextFields to a ListItem. The textfield values do not change, although  
shuffling around the backing list seems to work. As EditorButton doesn't  
process the form, each textfield seems to keep it's raw input instead of  
the updated model value.

Does anybody see my hopefully blatant error?

Steffen Dienst

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Listeditor

2009-11-30 Thread Igor Vaynberg
the point of the editor is that it is transactional. eg when you
create it the first thing it does is copy the model list into its
storage. if you edit the model before submitting the form the
listeditor will not reflect these changes because it operates on the
internal copy of the list...

-igor

On Mon, Nov 30, 2009 at 7:47 AM, Steffen Dienst
steffen.die...@gmail.com wrote:
 Hello friendly folks,

 I'm experimenting with the ListEditor as introduced at
 http://wicketinaction.com/2008/10/building-a-listeditor-form-component/.
 After implementing a move up/down functionality (see
 http://gist.github.com/245506), I'm getting problems as soon as I add
 TextFields to a ListItem. The textfield values do not change, although
 shuffling around the backing list seems to work. As EditorButton doesn't
 process the form, each textfield seems to keep it's raw input instead of the
 updated model value.
 Does anybody see my hopefully blatant error?

 Steffen Dienst

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org