The default IBM Sales Center actions
are defined by the com.ibm.commerce.telesales.ui.actionSetGroups
extension-point. This extension point allows you to specify a list
of actionSet
IDs and an ID for the whole group. This section explains how to extend
a menu
action.
Procedure
- Extend the action's implementation
class using the API documentation
for that class as a reference. In this sample, the logon action is
extended:
package extensions;
import com.ibm.commerce.telesales.ui.impl.actions.LogonAction;
public class ExtendedLogonAction extends LogonAction {
/**
* Override the run method to perform an extended logon
action.
*
* @see org.eclipse.jface.action.IAction#run()
*/
public void run() {
System.out.println("Extended Logon Action");
super.run();
}
}
- Define your own extension to
the actions extension point. The
extension is defined in a new plug-in called extensions:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="com.ibm.commerce.telesales.configurator">
<configurator path="config"/>
</extension>
<!-- Register actions -->
<extension point="com.ibm.commerce.telesales.ui.actions">
<action id="extensions.ExtendedLogonAction"
/>
</extension>
</plugin>
- Use the system configurator
extension point to indicate that the
new menu action will be used instead of the default IBM Sales Center
menu
action. Note that by default, all menu items delegate their real work
to an
action registered with com.ibm.commerce.telesales.ui.actions. Therefore
once
that action is overridden, the behavior of the menu item that delegates
to
that menu item is overridden as well.
com.ibm.commerce.telesales.action.LogonAction=extensions.ExtendedLogonAction