Develop > Presentation layer > Customize IBM Sales Center > Controls > Managed composites and widget managers
Declare a widget manager
A widget manager is responsible for providing the dynamic behavior for one or more widgets.
To declare a widget manager, widget managers will use the managerType attribute on a control or table column declaration to determine if it should manage the widget or ignore it.
To declare a new widget manager:
Procedure
- Create a plug-in to hold the extensions.
- In the plug-in's plugin.xml file, define an extension to the com.ibm.commerce.telesales.widgets.widgetManagers extension point to declare the widget manager.
- Include the widget manager in the definition of the managed composite that includes the controls that the widget manager is going to be responsible for managing. Replace the managed composite with a new one that includes the new widget manager. Use referenceId to pull in the original managed composite definition and then add the new widget manager.
Results
Example:
- Create a new widget manager class:
public class ExtendedWidgetManager extends StandardWidgetManager { // Handle the controls here }
- Extend the widget manager extension point in fragment.xml:
<extension point="com.ibm.commerce.telesales.widgets.widgetManagers"> <widgetManager id="WidgetManager_ID" managerClass="Fully qualified class path of widget manager class"> </widgetManager> </extension>
- Associate it with managed composite:
<extension point="com.ibm.commerce.telesales.widgets.managedComposites"> <managedComposite id="ManagedComposite_ID" compositeId="Composite_ID"> <widgetManager id="WidgetManager_ID"/> </managedComposite> </extension>
Related concepts
Managed composites and widget managers
Related tasks