This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 187414

Summary: MultiViewElementCallback should expose an InstanceContent
Product: platform Reporter: edvin
Component: Window SystemAssignee: issues@platform <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: Macintosh (x86)   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

Description edvin 2010-06-10 06:59:54 UTC
When creating a MultiViewTopComponent, the lookup of the MVTC changes according to the currently active MultiViewElement. This is fine ofcourse, but it would be a great enhancment if it was possible to add objects to the lookup of the MVTC in addition to the objects on the lookup of the active MultiViewElement.

Example: You have an arbitrary number of tabs in your MVTC that edits the same model object. If one tabs needs saving, the state of the Save-button should be reflected no matter which tab you go to, until you save. The current workaround seems to be to add a SaveCookie to ALL the MultiViewElements, or adding a "wrapper node" to the activatedNodes list of all MultiViewElements and add a SaveCookie to the CookieSet to reflect dirty-state across all tabs.

Neither solution is very elegant, and requires some plumbing. This usecase, and others, could be easily solved if the MultiViewTopComponent's lookup included an InstanceContent or some other proxy-object, and exposed this via the MultiViewElementCallback.