Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to send change-events to interested views(Loosly coupled change event propagation between views)
How to send change-events to interested views [message #538346] Mon, 07 June 2010 12:42 Go to next message
Christoph Miksovic is currently offline Christoph MiksovicFriend
Messages: 12
Registered: March 2010
Junior Member
Hello,
can anybody tell me what is the "correct way" to send change-events to interested views?
For example, suppose we have an RCP application with 3 views, all of which display the same domain model. If I now change the domain model in view number one, I would like to send a "ChangedEvent". The other views (view number two and three) can listen to this "ChangedEvent" so that they can refresh e.g. their JFace viewers in order to display the changed data.

Thank you very much for any hint.
Cheers,
Christoph
Re: How to send change-events to interested views [message #538400 is a reply to message #538346] Mon, 07 June 2010 14:48 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If you mean you select an entry in one of your views and the viewers in
the other 2 views need to update with new data, you probably want
http://www.eclipse.org/articles/Article-WorkbenchSelections/ article.html
.... posting a selection is how one view communicates with anyone that's
interested.

If you mean all of your viewers are displaying your model Person, and
the name attribute changes and they all need to show the new name ...
that only works if you model fires events when it changes. See the
databinding framework, which has support to hook up label providers with
IObservables. http://wiki.eclipse.org/JFace_Data_Binding

Later,
PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to send change-events to interested views [message #543498 is a reply to message #538400] Tue, 29 June 2010 15:11 Go to previous message
Christoph Miksovic is currently offline Christoph MiksovicFriend
Messages: 12
Registered: March 2010
Junior Member
Hello Paul,

thank you very much for your hint!
Cheers,
Christoph
Previous Topic:Disable close (x) in an Editor
Next Topic:Pull Down Toolbar Behavior
Goto Forum:
  


Current Time: Thu Apr 25 14:33:07 GMT 2024

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

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

Back to the top