Skip to main content



      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 08:42 Go to next message
Eclipse UserFriend
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 10:48 Go to previous messageGo to next message
Eclipse UserFriend
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 11:11 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 08:53:36 EDT 2025

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

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

Back to the top