Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Tightly Coupling Parent-Children Tableviewers
Tightly Coupling Parent-Children Tableviewers [message #538435] Mon, 07 June 2010 15:46 Go to next message
Eclipse UserFriend
Originally posted by: natgross.ATgmail.com

Hi;
I am looking for an abstract solution for Master-Detail (Parent-child)
tables. When a TableViewer is designated as a parent it should notify
it's children TableViewers upon row change, and the child table should
then display only child records of the current row in the parent.
It seems to me very simple, had I known the api thoroughly. (I think that
a TreeViewer has this ability built in and should be able to be used for
tables as well, but again, I can't nail it down.)
There are two key scenarios (in my case) as to where the data is coming
from to feed setInput().
(This needs to traverse multiple levels, like
Customers--->Orders--->orderLines....)
1: Where the parent has Collection(s) of the data that its children
require and is only a matter of automatically setting the input on the
children.
2: Where the parent needs to notify the child of the current row's data
and its up to the child to fetch the constrained data.

Although I have done this manually in the past (via line change
listeners), this requirement of master-detail keeps on popping up and its
time I had a generic solution.

Thank you all for your suggestions.
nat
Re: Tightly Coupling Parent-Children Tableviewers [message #538682 is a reply to message #538435] Tue, 08 June 2010 12:13 Go to previous messageGo to next message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
again a JFACE question in an SWT forum...

althou discussion would be intresting but i would like it to be moved to JFACE...

will join u there... Smile


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: Tightly Coupling Parent-Children Tableviewers [message #538690 is a reply to message #538435] Tue, 08 June 2010 12:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
That's what JFace-Databinding is providing you.

Tom

Am 07.06.10 17:46, schrieb nat G:
> Hi;
> I am looking for an abstract solution for Master-Detail (Parent-child)
> tables. When a TableViewer is designated as a parent it should notify
> it's children TableViewers upon row change, and the child table should
> then display only child records of the current row in the parent.
> It seems to me very simple, had I known the api thoroughly. (I think that
> a TreeViewer has this ability built in and should be able to be used for
> tables as well, but again, I can't nail it down.)
> There are two key scenarios (in my case) as to where the data is coming
> from to feed setInput().
> (This needs to traverse multiple levels, like
> Customers--->Orders--->orderLines....)
> 1: Where the parent has Collection(s) of the data that its children
> require and is only a matter of automatically setting the input on the
> children.
> 2: Where the parent needs to notify the child of the current row's data
> and its up to the child to fetch the constrained data.
>
> Although I have done this manually in the past (via line change
> listeners), this requirement of master-detail keeps on popping up and its
> time I had a generic solution.
>
> Thank you all for your suggestions.
> nat
Re: Tightly Coupling Parent-Children Tableviewers [message #538725 is a reply to message #538682] Tue, 08 June 2010 13:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: natgross.ATgmail.com

On Tue, 08 Jun 2010 17:43:56 +0530, vijay wrote:

> again a JFACE question in an SWT forum...
>
> althou discussion would be intresting but i would like it to be moved to
> JFACE...
>
> will join u there... :)

Hey! I didn't know there was a jface specific forum! Thanks!
Re: Tightly Coupling Parent-Children Tableviewers [message #538727 is a reply to message #538690] Tue, 08 June 2010 13:20 Go to previous message
Eclipse UserFriend
Originally posted by: natgross.ATgmail.com

On Tue, 08 Jun 2010 14:23:13 +0200, Tom Schindl wrote:

> That's what JFace-Databinding is providing you.
>
> Tom
>
Databinding does much more and I don't want to learn the api just for
this feature.
Thanks,
nat
Previous Topic:Aligning widgets within different composites
Next Topic:How to get OS X standard menubar behavior?
Goto Forum:
  


Current Time: Fri Dec 19 12:26:31 GMT 2014

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

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