Tutorials > Sales Center > Add an editable column to the Order Items table by creating a new widget manager
Create a custom Sales Center plug-in
The IBM Sales Center consists of a set of Eclipse plug-ins. In this step, you create a new plug-in to hold the custom code. By isolating the code in its own plug-in, you can find the code and ensure that the customizations are not overwritten by any fix packs or migration to future versions.
In general, it is recommended that you create only one plug-in to contain the customization. Over time, you might have several customization that logically fall into separate plug-ins, in which case you can create more than one plug-in.
In Rational Application Developer, a plug-in is represented by a plug-in project.
To create the new plug-in project:
- Click File > New > Plug-in project.
- In the Project name field, enter com.example.commerce.telesales.myNewPracticePlugin.
- Select Create an OSGi bundle manifest for the plug-in and keep all other default values.
- Click Next.
- Keep all default values and click Finish.
- In the Package Explorer view, the com.example.commerce.telesales.myNewPracticePlugin project is displayed and the plug-in opens for editing.
- Rename package name from com.example.commerce.telesales.mynewpracticeplugin to com.example.commerce.telesales.myNewPracticePlugin.
Because Sales Center automatically generates the package name in lower cases, you have to re-specify the project name.
To specify required plug-ins:In this step, you define which plug-ins the plug-in depends upon, similar to import statements in a Java class.
To define the dependencies for the new plug-in:
- In the Editor view, click the Dependencies tab
- Click Add.
- Add the following required plug-ins, in addition to the two default plug-ins already listed:
- com.ibm.commerce.telesales
- com.ibm.commerce.telesales.widgets
- com.ibm.commerce.telesales.core
- com.ibm.commerce.telesales.core.impl
- com.ibm.commerce.telesales.resources
- com.ibm.commerce.telesales.ui
- com.ibm.commerce.telesales.ui.impl
- com.ibm.commerce.telesales.config
- Save the changes.
- Click the MANIFEST.MF tab, to view the following text. This text reflects the required plug-ins you added on the Dependencies tab:
Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, com.ibm.commerce.telesales.core, com.ibm.commerce.telesales, com.ibm.commerce.telesales.resources, com.ibm.commerce.telesales.ui, com.ibm.commerce.telesales.ui.impl, com.ibm.commerce.telesales.widgets, com.ibm.commerce.telesales.config, com.ibm.commerce.telesales.core.impl
To register a custom extension with the system configurator:Indicate that you plan to use the System Configurator to identify that a custom extension of the user interface widget is to be used instead of the default widget definition:
- In the Editor view, click the Extensions tab.
- Click Add.
- From the Extension Points, select com.ibm.commerce.telesales.configurator and click Finish.
- In the All Extensions list, select com.ibm.commerce.telesales.configurator > configurator.
- In the path field, change the default path com.example.commerce.telesales.myNewPracticePlugin.configurator1 to config.
- Save the changes.
- Click the plugin.xml tab to view the following text. This text reflects the required plug-ins you added in the Extensions tab.
<extension point="com.ibm.commerce.telesales.configurator"> <configurator path="config"/> </extension>