Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse 3.5 property databinding with nested property names
Eclipse 3.5 property databinding with nested property names [message #483578] Wed, 02 September 2009 08:00 Go to next message
Reto Urfer is currently offline Reto UrferFriend
Messages: 8
Registered: July 2009
Junior Member
Hi

Eclipse 3.5 does supports nested property names "a.b.c" for value
databinding but unfortunately for list, set and map databinding only simple
porperty names "a" are supported.

Is there any reason why nested property names are not supported for list,
set and map?

I implemented a corresponding extension for list and it seems to work
properly (see attached list_method.java). The same extension could easily be
implemented for set and map properties. If property name is "a.b.c", "a" and
"b" are value properties and only "c" is the list, set or map property.

Thanks

Reto



Re: Eclipse 3.5 property databinding with nested property names [message #483668 is a reply to message #483578] Wed, 02 September 2009 14:04 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Reto Urfer wrote:
> Eclipse 3.5 does supports nested property names "a.b.c" for value
> databinding but unfortunately for list, set and map databinding only simple
> porperty names "a" are supported.
>
> Is there any reason why nested property names are not supported for list,
> set and map?

They are supported, but I did not support them as dot-delimited strings
because there is no standard syntax for specifying a list property. If
we accepted code like:

IListProperty siblingNamesProp =
BeanProperties.list("parent.children.name")

Then BeanProperties would basically have to guess which of the three
nested properties is the list property. Rather than do this you use
three method calls to make it explicit:

IListProperty siblineNamesProp =
BeanProperties.value("parent").list("children").values("name ");

which accomplishes the same thing. The same pattern may be applied to
get nested set or map properties.

Matthew
Previous Topic:Save Changes Popup
Next Topic:3.5 Stand Alone RCP Missing Bundles
Goto Forum:
  


Current Time: Fri Apr 19 15:48:38 GMT 2024

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

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

Back to the top