Menu Item enable disable with pluggable modules

Topics: CAB & Smart Client Software Factory
May 17, 2006 at 11:27 AM
originally posted by: Westby

We are developing a UI using the CAB and SmartClient Guidance package and had a couple questions regarding best practices.
- We want pluggable modules, which will supply Smartparts and/or data to other core modules. E.g. a pluggable module might supply a Smartpart that is displayed in a core smartpart workspace. The pluggable module might also only supply data which might extend a core module smartpart, e.g. add a new column in a core SmartPart.
- This pluggable module might also insert a menuitem, that needs to be enabled/disabled based on "context". E.g. User is positioned on one of the smartparts the plugin either supplied or extended.

Question 1) Is there a best practice as to which workitem the plugin should belong to? E.g. It could be added in the form of a controller to the core module workitem, or should another workitem be created that manages the smartpart?
- If we add to the core module workitem, then we might be able to key off the workitem.activate/deactiveate events to determine what is visable.

Question 2) Is there a best practice how to enable/disable menuitems that are common across modules? I think I read other posts regarding a service that manages this.

Thanks in advance, the CAB rocks.
Steve