|Problem: ESelectionService for master-detail-parts [message #1076378]
||Wed, 31 July 2013 09:26
| Stephan Lück
Registered: July 2013
I stumbled into the following problem:
Trying to realize a master-detail view, I put a Part with a ListViewer on it (the master) and a PartStack (the detail) into a PartSashContainer.
To display multiple instances of one part as detail, I use a PartDescriptor.
Each double click on the list on the master should open a detail-tab (if not opened yet( or bring it to top (if already opened).
Each simple selection should just bring the tab to top if it exists.
This all works fine.
To display some selection information in the detail tab, I use an IDoubleClickListener to open a part or bring it to top. In this listener, I call
on the injected service.
The detail part consumes this selection to display the information in the part:
This works as expected for the first double-click only.
What goes wrong:
When I click on further list entries, the old information of the first click is displayed. I would expect the service injected into the part displaying the information of the new selection.
I would like to provide some monitored bahaviour:
- Each detail part that is created from the PartDescriptor gets a new ESelectionService instance injected. Is this correct? I would expect that this service is singleton within at least a particular context (e.g. window)
- I debugged to check whether setting and consuming the selection is done in a correct order. I found out that it is and - surprise - when launching the application in debug mode, everything works as expected!!!
Strange, isn't it?
Does anybody of you know what my problem is?
Please let me know if you need some further information (code, screenshots etc.).
Thanks a lot in advance,
Powered by FUDForum
. Page generated in 0.02401 seconds