Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How can I exchange data between perspective?
How can I exchange data between perspective? [message #447614] Tue, 11 April 2006 22:32 Go to next message
Eclipse UserFriend
Originally posted by: wangyu111.sina.com

I want to send some data which come from a widget in perspective A to another
widget in perspective B ,when i switch the perspective from A to B. How can I
do that ? How can perspective B know the data ?
Re: How can I exchange data between perspective? [message #447671 is a reply to message #447614] Wed, 12 April 2006 07:20 Go to previous messageGo to next message
Eclipse UserFriend
wy wrote:
> I want to send some data which come from a widget in perspective A to another
> widget in perspective B ,when i switch the perspective from A to B. How can I
> do that ? How can perspective B know the data ?


Well ... a perspective is entirely hidden from the user. So
perspectives don't really have user data associated with them. Do you
mean you want to have information from view1 in p1 available in view2 in
p2, when you switch from p1 to p2?

Later,
PW
Re: How can I exchange data between perspective? [message #447805 is a reply to message #447671] Mon, 17 April 2006 06:09 Go to previous messageGo to next message
Eclipse UserFriend
Do you
> mean you want to have information from view1 in p1
> available in view2 in
> p2, when you switch from p1 to p2?

What is the best way to to have information from view1 in p1 available in view2 in
p2, when you switch from p1 to p2?

The scenario I have is there are two perspectives, the first one has a list, the user selects a row and click a button which programatically changes to perspective2 and is meant to show detailed information in a number of view about the row selected.

I've tried a selection provider, but view2 isn't loaded until the first time p2 is loaded.

Thanks
Re: How can I exchange data between perspective? [message #447814 is a reply to message #447805] Mon, 17 April 2006 10:56 Go to previous messageGo to next message
Eclipse UserFriend
Hmmm, what about doing an getSite().getPage().findView("view1.id") from
your view2 code.

Assuming it's not null, you would be able to cast it to a view1 and
query view1 for it's current selections.

Later,
PW
Re: How can I exchange data between perspective? [message #448140 is a reply to message #447805] Tue, 18 April 2006 20:38 Go to previous message
Eclipse UserFriend
Originally posted by: m.mcfadin.insightbb.com

Bob Smith wrote:
> Do you
>> mean you want to have information from view1 in p1
>> available in view2 in
>> p2, when you switch from p1 to p2?
>
> What is the best way to to have information from view1 in p1 available in view2 in
> p2, when you switch from p1 to p2?
>
> The scenario I have is there are two perspectives, the first one has a list, the user selects a row and click a button which programatically changes to perspective2 and is meant to show detailed information in a number of view about the row selected.
>
> I've tried a selection provider, but view2 isn't loaded until the first time p2 is loaded.
>
> Thanks
I have done this by getting handle to the SWT Display and using it's
setData(Object obj) method to store a bean. SWT doc indicates this
facility can be used to store arbitrary data. The second view in another
perspective can pull out a reference and even register as listener on
changes to the beans properties so you can update the second view.

Mike McFadin
Previous Topic:Word wrapping in editors
Next Topic:Set menu's order in menuBar
Goto Forum:
  


Current Time: Tue Jul 08 10:45:28 EDT 2025

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

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

Back to the top