-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Making a temporary object
PostPosted: Fri May 27, 2005 6:24 am 
Newbie

Joined: Fri May 27, 2005 6:16 am
Posts: 14
Hi everyone,

I have created an eclipse plugin which gets a tree structure from the database with the help from hibernate. When users open an object in the tree an editor comes up with that object as a parameter. When they close the editor the user is asked whether he wants to save or not. The editor is created by getting all properties from the parent object and making labels and text fields for them. Then I loop all children (and grandchildren) and do the same for them. I attach a modifylistener to the text fields that uses the classmetadata to update the properties of each object.

When opening the editor I just do MyObject obj = (MyObject)parameter, and the sample is saved locally. But when the user closes the editor without saving, all changes are still persistent in the tree. I tried refreshing when making the labels and text fields, but this doesn't work.

Anyone has an idea on how to make a temporary object (not attached to ts parent), and only to replace the normal one when the user really asks to save. I tried some things, but keep on running against walls. Hibernate complains about the non-unique key, deleting the old and adding the changed version does not work either.

Best regards,
Leen Toelen


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.