Develop > Presentation layer > Management Center framework > Customize the Management Center user interface > Customizing an existing Management Center tool


Add a new custom service to the Management Center

You can define a custom service and associate it with a Management Center business object definition. Use a custom service to perform a processing action on a business object. For example, to activate a promotion. Do not use a custom service to perform the basic business operations: Create, Update, and Delete.


Before you begin

Before you customize the Management Center user interface, ensure you have customized the persistence layer and the Business Object Manager:

  1. Created a new WebSphere Commerce table in the schema.

  2. Generated object relational metadata and the physical SDO.

  3. Configured the Business Object Manager to include new properties in user data.

  4. Updated query templates for read and update.

  5. Created a Struts action that maps the processing action to a component service.

To add a custom service to the Management Center:


Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  2. In the Project Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > commerce > Management_Center_component >objectDefinitions, where Management_Center_component is the name of the tool to customize. Custom services are declared as child nodes of primary object definitions using wcfCustomService.

  3. Identify the file that contains the object definition that to add the custom service to. Open the file and locate the object definition class.

  4. Update the object definition with the custom service. The following example demonstrates the instantiation of a custom service that activates a promotion. The custom service declaration includes an enablement condition that ensures that the action is only available when the promotion is inactive.

    <wcfCustomService url="/cmc/ActivatePromotion" toolbarIcon="activateToolbarIcon" 
       displayName="${promotionResources.promotionList_activate_displayName.string}">   
    <wcfEnablementCondition conditionId="activate" propertyName="status" enablementValue="Inactive" />   
    <wcfServiceParam name="promotionId" propertyName="promotionId"/>
    </wcfCustomService>
    


What to do next

After you complete the customization:

  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent directory. This is the default environment setting.

  2. Test the changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.

  3. Deploy your changes to the production environment.


Related concepts

Management Center shell

Management Center user interface


+

Search Tips   |   Advanced Search