|IViewSite (ico multi-instance view): no means to update secondaryId [message #533886]
||Mon, 17 May 2010 11:44
| Guy Rooms
Registered: May 2010
I have a situation/question concerning multi-instance views:
- (single) view_A: showing list of available devices
- (multiple) view_B: displaying details for a single device
- Scenario A:
"Via context menu on View_A, provide means to Create (and jump to) new
instance of view_B."
This works fine using the secondaryId, e.g.:
"activePage.showView(<view_B_Id>, <secondaryId>, IWorkbenchPage.VIEW_CREATE);"
Here, the <secondaryId> corresponds to a device, and is used during
view_Bs creation (using "IViewSite.getSecondaryID()")
- Scenario B:
"Additionaly have a dropdown list in View_Bs toolbar to be able to
switch to another device."
Also this works fine: I can add a dropdown list, I can update view_B
its contents according to the newly selected device.
however the (internal) secondaryId (corresponding to the originally
selected device) remains the same.
As a result, a discrepancy is created between view_Bs content (details
on newly selected device) and its internal secondaryId (originally
As a result, this breaks the expected behavior of Scenario A.
A solution to this problem could be to provide a means to extend the
IViewSite interface with a method to update the secondaryID.
- Is it an option to have IViewSite extended with:
- Is there another, existing solution I don't know about, fulfilling
both requested scenario's
- Any other, better solution ?
Thank you for your replies.
Powered by FUDForum
. Page generated in 0.02294 seconds