Adding a keyboard shortcut for a new custom service
If you have created a custom service for a Management Center business object, you can also associate a keyboard shortcut for the service.
Before you begin
- Defined the custom action.
- You can use any combination of keys on the keyboard, to create
your keyboard shortcut; however, keep the following logistics in mind
when creating your keyboard shortcut:
- Ensure the keyboard shortcut you want to use for the custom action is not one that is already used for the Management Center. If you define a keyboard shortcut that is already used, when the business user uses the keyboard shortcut, two actions will take place.
- Ensure the keyboard shortcut you want to use for the custom action is not one that is already used for the browser that the business user will use with the Management Center (that is, Internet Explorer or FireFox).
- The order of the combination of keys is the order that the business user will need to press when using the keyboard shortcut. For example, if you define a keyboard shortcut as shortcutKeys="['Control', '1'], then a business user must hold down the Ctrl key, and then the 1 key on the keyboard.
- Keyboard shortcuts are not case sensitive. For example, shortcutKeys="['Control', 'p'] and shortcutKeys="['Control', 'P' both mean that a user can press the Ctrl key plus the P key (that is, there is no need for the user to press Ctrl+Shift+P).
- Keyboard shortcuts can be any number of keys (including a single key), but consider the usability of complicated or lengthy keyboard combinations. Typically, you do not want to create a keyboard shortcut that involves more than three keys.
Procedure
- Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
- Complete one of the following steps:
- In the Enterprise Explorer view, expand , where Management_Center_component is the name of the tool you want to customize.
- In the Enterprise Explorer view, expand , where Management_Center_component is the name of the tool you want to customize.
- Open the file that contains the custom service declaration that you want to modify.
- Complete one of the following steps:
Option Description Include the shortcutKeys attribute within the wcfCustomService tag Within your instance of the wcfCustomService class, include the shortcutKeys attribute within the wcfCustomService tag. The following example shows how to set up the Ctrl+1 keyboard shortcut to activate a promotion:<wcfCustomService url="/jsp/commerce/test/ActivateTestObject.jsp" displayName="Activate" shortcutKeys="['Control', '1']" toolbarIcon="active"> <wcfEnablementCondition propertyName="active" enablementValue="false"/> <wcfServiceParam name="storeId"/> <wcfServiceParam name="testObjectId" propertyName="testObjectId"/> </wcfCustomService>
Add the shortcutKeys attribute to the CustomService tag The following example shows how to set up the Ctrl+1 keyboard shortcut to activate a promotion: <CustomService url="/cmc/ActivatePromotion" toolbarIcon="activateToolbarIcon" displayName="${promotionResources.promotionList_activate_displayName}" shortcutKeys="['Control', '1']"> <EnablementCondition conditionId="activate" propertyName="status" enablementValue="Inactive" /> <ServiceParam name="promotionId" propertyName="promotionId"/> </CustomService>
What to do next
Version | Steps |
---|---|
|
|
|