Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problem with communication between Views over Selection Mechanism
Problem with communication between Views over Selection Mechanism [message #463930] Tue, 20 February 2007 10:01
Eclipse UserFriend
Originally posted by: robert.moestl.joanneum.at

Hello friends!

I have a very tricky challenge to master.

Basically my application consists of two views. One (ProjectView) is
showing projects and the other (RoomView) lists the rooms contained in
one project. When selection of a project in ProjectView takes place, the
rooms of this project should be shown in RoomView.

The communication is done via the Eclipse selection mechanism, what
means that RoomView listens to StructuredSelections. If a
StructuredSelection indicates that a different project was selected, the
RoomView updates itself. This functions very well.

But! What to do when there is just one project which is deleted by the
user. As a consequence no selection can take place, even a selection of
a NullInstance object can't be simulated, because it is not a input of
the viewer in ProjectView. Thus one can fire a selection by
viewer.setSelection(new StructuredSelection(NullInstance)) but this
selection event never reaches the RoomView. As a result the RoomView
doesn't update itself and so the rooms of the deleted project are still
shown!

Does anybody know how to solve this problem in a smart way? May a
pattern exists for this behavior?!

Thanks in advance,
Robert
Previous Topic:Which components to use
Next Topic:[CommonNavigator] Bind doubleClick to ViewItemDelegate
Goto Forum:
  


Current Time: Wed Mar 26 05:15:02 EDT 2025

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

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

Back to the top