Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » How do I bind CCombo contents to a parent-child bean?(observeList() does not seem to resolve a compound property name like parent.child)
How do I bind CCombo contents to a parent-child bean? [message #637545] Sat, 06 November 2010 09:03
John Ormerod is currently offline John Ormerod
Messages: 39
Registered: January 2010
Member
Hello
jFace databinding must be one of Eclipse's best kept secrets!

I have successfully used it to bind to single values in beans that contain child beans, using the propertyName format: xxxx.yyyy.

I've now got to the point of Combos and wanting to populate from a List in a child bean. However, when I code:
BeansObservables.observeList(parentDO, "parent.child", String.class)
the framework reports that it can't find 'parent.child' in parentDO.

Yet, when I have used BeansObservables.observeValue(parentDO, "parent.child") for Text parts, it resolves perfectly by using the getChildDO() method in the parentDO.

Is this a bug for lists?

I have tried hard-coding the getChildDO of the paretnDO and using its result along with "child" in the observeList() method and it works fine.

The reason I can't actually hard code this, is that I'm using databinding as part of an investigation into creating 'detail' GUIs using an externally-defined layout topology in XML (plugin.xml initially). So my code doesn't know the specifics of what it is actually dealing with. In fact, finding databinding solved the worry in the back of my mind as to how best to link to the model... until I got to Combos!

Regards, John

[Updated on: Sat, 06 November 2010 09:06]

Report message to a moderator

Previous Topic:How to update TreeViewer?
Next Topic:TreeViewer with multiple columns
Goto Forum:
  


Current Time: Sat Aug 30 16:43:23 EDT 2014

Powered by FUDForum. Page generated in 0.01593 seconds