Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [DataBinding] Binding to multiple objects
[DataBinding] Binding to multiple objects [message #335277] Mon, 30 March 2009 14:42 Go to next message
Casey Marshall is currently offline Casey MarshallFriend
Messages: 15
Registered: July 2009
Junior Member
Hi,
I'm using JFace databinding in my app and it's working great! Need some
help with a more advanced binding case though..

I have a kind of master-detail UI pattern, and eventually I need to
support multiple selections. When multiple "master" objects are selected,
the "details" widgets need to show a single value if all the objects have
the same value for a given property, "<multiple values>" if the objects
have different values, and if I edit the value in given widget, it should
apply to all objects.

A good example is the behavior of fields for "Artist", "Album", etc. in a
typical ID3 tag editor when selecting multiple songs.

I can probably create a custom IObservable to implement this, or a wrapper
at the domain object level (less desirable), but since it seems like a
common UI pattern... does such a thing already exist in the framework, or
there is a good example somewhere of a "single widget -> multiple objects"
scenario like this?

Thanks!
Casey
Re: [DataBinding] Binding to multiple objects [message #335278 is a reply to message #335277] Mon, 30 March 2009 15:08 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
We just barely added support for this in 3.5M6.

http://fire-change-event.blogspot.com/2009/02/master-detail- editing-with-multiple.html

Matthew

Casey Marshall wrote:
> Hi,
> I'm using JFace databinding in my app and it's working great! Need some
> help with a more advanced binding case though..
>
> I have a kind of master-detail UI pattern, and eventually I need to
> support multiple selections. When multiple "master" objects are
> selected, the "details" widgets need to show a single value if all the
> objects have the same value for a given property, "<multiple values>" if
> the objects have different values, and if I edit the value in given
> widget, it should apply to all objects.
>
> A good example is the behavior of fields for "Artist", "Album", etc. in
> a typical ID3 tag editor when selecting multiple songs.
>
> I can probably create a custom IObservable to implement this, or a
> wrapper at the domain object level (less desirable), but since it seems
> like a common UI pattern... does such a thing already exist in the
> framework, or there is a good example somewhere of a "single widget ->
> multiple objects" scenario like this?
>
> Thanks!
> Casey
>
Re: [DataBinding] Binding to multiple objects [message #335282 is a reply to message #335277] Mon, 30 March 2009 15:48 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 3/30/2009 10:42 AM, Casey Marshall wrote:
> Hi,
> I'm using JFace databinding in my app and it's working great! Need some
> help with a more advanced binding case though..
>
> I have a kind of master-detail UI pattern, and eventually I need to
> support multiple selections. When multiple "master" objects are
> selected, the "details" widgets need to show a single value if all the
> objects have the same value for a given property, "<multiple values>" if
> the objects have different values, and if I edit the value in given
> widget, it should apply to all objects.
>
> A good example is the behavior of fields for "Artist", "Album", etc. in
> a typical ID3 tag editor when selecting multiple songs.
>
> I can probably create a custom IObservable to implement this, or a
> wrapper at the domain object level (less desirable), but since it seems
> like a common UI pattern... does such a thing already exist in the
> framework, or there is a good example somewhere of a "single widget ->
> multiple objects" scenario like this?

I guess you'll have to use a ComputedValue to do this. But I haven't
looked closely at the new capabilities coming for Data binding in
Eclipse 3.5, so maybe there is some more advanced support...

Eric
Previous Topic:JFace Rhino Databinding
Next Topic:Add actions from different plugins
Goto Forum:
  


Current Time: Fri Apr 19 19:47:09 GMT 2024

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

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

Back to the top