Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Data binding to an EMF model via feature path
Data binding to an EMF model via feature path [message #1648275] Tue, 03 March 2015 21:17 Go to next message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
Suppose I have an EMF object called "Parent", which has a member called "Child", and Child has a string called "Name". Also suppose I use databinding to bind a text field to the Child's Name using a Parent object as the model and a feature path of the Child feature and the Name feature. When I type into the text field, nothing happens if the Child is null. Is there an easy way to code this so that the Child object is instantiated and set automatically when the databinding tries to set the value of Name? Ideally the child object would get nulled out when the name is cleared as well. This seems like a common enough case that there should be an easy solution, but I can't find it.
Re: Data binding to an EMF model via feature path [message #1650169 is a reply to message #1648275] Wed, 04 March 2015 17:57 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6417
Registered: July 2009
Senior Member
Hi,

No there's not out of the box solution to that! You'd have to write this
yourself. I can somehow remember having written such a logic for a
custom but I currently can't remember for wich one i did it not I can
recap how :-(

Tom

On 03.03.15 22:17, Justin Weir wrote:
> Suppose I have an EMF object called "Parent", which has a member called
> "Child", and Child has a string called "Name". Also suppose I use
> databinding to bind a text field to the Child's Name using a Parent
> object as the model and a feature path of the Child feature and the Name
> feature. When I type into the text field, nothing happens if the Child
> is null. Is there an easy way to code this so that the Child object is
> instantiated and set automatically when the databinding tries to set the
> value of Name? Ideally the child object would get nulled out when the
> name is cleared as well. This seems like a common enough case that
> there should be an easy solution, but I can't find it.
Previous Topic:add listener to next button wizard page
Next Topic:Syncing different Parts together
Goto Forum:
  


Current Time: Sat Nov 17 21:11:34 GMT 2018

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

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

Back to the top