Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » teneo, databinding, model and a treeview(Problem with databinding)
teneo, databinding, model and a treeview [message #506467] Thu, 07 January 2010 16:07 Go to next message
Nebulus is currently offline NebulusFriend
Messages: 4
Registered: January 2010
Junior Member
Hello,

I have made a small RCP-Application. I work with databinding and a Treeview. My datamodel represents a tree of folders like the Windows Explorer. I can add Folders and Subfolders and it works fine.
Now I would store the "folders" in a database with teneo. If I load my application I can add folders and subfolders to existing folders and subfolders. The TreeViewer shows the new folders and subfolders. These folders are also stored.
But if I add subfolders to the new folders or subfolders, the TreeViewer shows these folder but they where not stored.

Maybe, someone have a good tutorial ore an idea.

The property "children" of a loaded item contains a HibernatePersistableEList<E>.
But the "children"-property of an added item contains an EObjectWithInverseResolvingEList<E>.

I think, this is the problem.

Re: teneo, databinding, model and a treeview [message #506496 is a reply to message #506467] Thu, 07 January 2010 17:36 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Nebulus,
Indeed objects loaded from the database have the hibernatepersistableelist and new objects have an EMF elist. However,
this normally works fine. So afaics this is not the problem. I guess you don't see exceptions etc.?
Apart from this the only thing you can do is debug some more into the HibernateResource (in the method taking care of
saving to the database)?
Then when you have more info just post it on the EMF newsgroup and I can take a further look.

Teneo is supported on the EMF newsgroup which I added as cc.

gr. Martin

Nebulus wrote:
> Hello,
> I have made a small RCP-Application. I work with databinding and a
> Treeview. My datamodel represents a tree of folders like the Windows
> Explorer. I can add Folders and Subfolders and it works fine.
> Now I would store the "folders" in a database with teneo. If I load my
> application I can add folders and subfolders to existing folders and
> subfolders. The TreeViewer shows the new folders and subfolders. These
> folders are also stored. But if I add subfolders to the new folders or
> subfolders, the TreeViewer shows these folder but they where not stored.
> Maybe, someone have a good tutorial ore an idea.
> The property "children" of a loaded item contains a
> HibernatePersistableEList<E>. But the "children"-property of an added
> item contains an EObjectWithInverseResolvingEList<E>.
>
> I think, this is the problem.
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: teneo, databinding, model and a treeview [message #506497 is a reply to message #506496] Thu, 07 January 2010 17:41 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Martin, I remember us fixing this problem in Teneo some time before
EclipseCon 2009 which looks like this.

Nebulus which version of Teneo do you use and how are you
adding/removing subitems?

Tom

Am 07.01.10 18:36, schrieb Martin Taal:
> Hi Nebulus,
> Indeed objects loaded from the database have the
> hibernatepersistableelist and new objects have an EMF elist. However,
> this normally works fine. So afaics this is not the problem. I guess you
> don't see exceptions etc.?
> Apart from this the only thing you can do is debug some more into the
> HibernateResource (in the method taking care of saving to the database)?
> Then when you have more info just post it on the EMF newsgroup and I can
> take a further look.
>
> Teneo is supported on the EMF newsgroup which I added as cc.
>
> gr. Martin
>
> Nebulus wrote:
>> Hello,
>> I have made a small RCP-Application. I work with databinding and a
>> Treeview. My datamodel represents a tree of folders like the Windows
>> Explorer. I can add Folders and Subfolders and it works fine.
>> Now I would store the "folders" in a database with teneo. If I load my
>> application I can add folders and subfolders to existing folders and
>> subfolders. The TreeViewer shows the new folders and subfolders. These
>> folders are also stored. But if I add subfolders to the new folders or
>> subfolders, the TreeViewer shows these folder but they where not stored.
>> Maybe, someone have a good tutorial ore an idea.
>> The property "children" of a loaded item contains a
>> HibernatePersistableEList<E>. But the "children"-property of an added
>> item contains an EObjectWithInverseResolvingEList<E>.
>>
>> I think, this is the problem.
>>
>
>
Re: teneo, databinding, model and a treeview [message #507421 is a reply to message #506497] Wed, 13 January 2010 12:45 Go to previous messageGo to next message
Nebulus is currently offline NebulusFriend
Messages: 4
Registered: January 2010
Junior Member
Ok, thank you for your help. I solved the problem. My data model was incorrect. The property "Containment" of the EReference "children" must set to "true".

That's all.
Re: teneo, databinding, model and a treeview [message #621971 is a reply to message #506496] Thu, 07 January 2010 17:41 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Martin, I remember us fixing this problem in Teneo some time before
EclipseCon 2009 which looks like this.

Nebulus which version of Teneo do you use and how are you
adding/removing subitems?

Tom

Am 07.01.10 18:36, schrieb Martin Taal:
> Hi Nebulus,
> Indeed objects loaded from the database have the
> hibernatepersistableelist and new objects have an EMF elist. However,
> this normally works fine. So afaics this is not the problem. I guess you
> don't see exceptions etc.?
> Apart from this the only thing you can do is debug some more into the
> HibernateResource (in the method taking care of saving to the database)?
> Then when you have more info just post it on the EMF newsgroup and I can
> take a further look.
>
> Teneo is supported on the EMF newsgroup which I added as cc.
>
> gr. Martin
>
> Nebulus wrote:
>> Hello,
>> I have made a small RCP-Application. I work with databinding and a
>> Treeview. My datamodel represents a tree of folders like the Windows
>> Explorer. I can add Folders and Subfolders and it works fine.
>> Now I would store the "folders" in a database with teneo. If I load my
>> application I can add folders and subfolders to existing folders and
>> subfolders. The TreeViewer shows the new folders and subfolders. These
>> folders are also stored. But if I add subfolders to the new folders or
>> subfolders, the TreeViewer shows these folder but they where not stored.
>> Maybe, someone have a good tutorial ore an idea.
>> The property "children" of a loaded item contains a
>> HibernatePersistableEList<E>. But the "children"-property of an added
>> item contains an EObjectWithInverseResolvingEList<E>.
>>
>> I think, this is the problem.
>>
>
>
Re: teneo, databinding, model and a treeview [message #621992 is a reply to message #506497] Wed, 13 January 2010 12:45 Go to previous message
Nebulus is currently offline NebulusFriend
Messages: 4
Registered: January 2010
Junior Member
Ok, thank you for your help. I solved the problem. My data model was incorrect. The property "Containment" of the EReference "children" must set to "true".

That's all.
Previous Topic:treeview
Next Topic:CDO exception
Goto Forum:
  


Current Time: Thu Mar 28 15:14:04 GMT 2024

Powered by FUDForum. Page generated in 0.04575 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top