Overview of the click-to-edit function in store preview

The click-to-edit function allows business users to create and edit business objects in Management Center directly from store preview pages by clicking embedded links. For example, a business user who is viewing a product in store preview can click an Edit link. The link opens the product in the Management Center Catalogs tool for editing. If you are customizing store preview to add or extend click-to-edit support, make sure that you understand the flow between Management Center and store preview.

To review screen captures of the click-to-edit function from a business user’s perspective, see Click-to-edit function in store preview.

Flow for a Create link

The following diagram illustrates the flow between Management Center and store preview for a Create link:


Flow for a Create link

The steps in the diagram are explained here:

  • 1 The click-to-edit flow begins when a business user launches store preview from Management Center.
  • 2 In store preview, the business user navigates to a store page that displays a business object that supports the click-to-edit function. For example, the store page might display a product, a category, an e-Marketing Spot, or the search results to which a search rule is applied. To display Create and Edit links for the business object, the business user clicks a Show Page Information button at the top of the preview window. For e-Marketing Spots and search rules, there is an extra step; the business user must click a Show Information link that is embedded on the displayed business object to open a pop-up window. The Create and Edit links are embedded on the pop-up window.
  • 3 The business user clicks the Create link. The code snippet for the link composes a CreateBusinessObject Management Center URL. This URL provides the data that is required to create a business object in Management Center. This data includes the objectType that is defined in the primary object definition for the business object, for example, EMarketingSpot or WebActivity. The URL is passed to the callManagementCenter JavaScript function, which submits the request to the Management Center web application.

    To learn more about the code snippet, see Code snippet to add a “Create” link and Click-to-edit code snippets in the Aurora starter store.

    Customization point: You can add your own Create links to store pages and store preview pop-up windows.

    WebSphere Commerce DeveloperWebSphere Commerce EnterpriseCustomization point: For an extended site, you can change the default behavior of the Create link to open the asset store or the extended site store in Management Center. The default behavior displays a prompt for the business user to choose the store.

  • 4 The Management Center web application receives the CreateBusinessObject Management Center URL.
  • 5 The CreateBusinessObject URL contains a toolId parameter that indicates the correct Management Center tool in which to create the business object, such as the Catalogs tool. If that tool is not currently open in Management Center, the click-to-edit business logic opens the correct tool. The toolId value must match the id attribute of one of the tools that is found in the following file:

    WCDE_installdir/workspace/LOBTools/WebContent/config/commerce/shell/ApplicationMenuItems.def

    An example of a toolId value is catalogManagement.

  • 6 The CreateBusinessObject URL contains a storeId parameter that is used to determine the correct store to open in Management Center. For extended sites, the URL also contains a configurable storePreference parameter that is used together with the storeId parameter to determine which store to open. For more information about the storePreference parameter, see Changing the store preference setting for the click-to-edit function.
  • 7 Create links are added to store pages to allow the business user to create new business objects that affect the current page. For example, if the current page displays an e-Marketing Spot, then a Create link can help the business user to create a web activity for that e-Marketing Spot. In Management Center, the list of e-Marketing Spots for the new web activity will be prefilled with the correct e-Marketing Spot. This initialization is performed by the Populate New Object Service (wcfPopulateNewObjectService) associated with the web activity object definition. The primary ID of the e-Marketing Spot is passed to the Populate New Object Service through a newObjectOption parameter that is included in the CreateBusinessObject URL.

    Customization point: You can provide a custom Populate New Object Service for a business object.

  • 8 The correct Management Center tool opens to a view or window that is the starting point for creating a business object. For example:
    • For an e-Marketing Spot, the properties view for a new e-Marketing Spot opens with the Name value prefilled.
    • For a web activity, the New Activity From Template window opens so that the business user can select a template. Then, the properties view for a new web activity opens with the E-Marketing Spots table prefilled with the correct e-Marketing Spot.

Flow for an Edit link

The following diagram illustrates the flow between Management Center and store preview for an Edit link:


Flow for an Edit link

The steps in the diagram are explained here:

  • 1 The click-to-edit flow begins when a business user launches store preview from Management Center.
  • 2 In store preview, the business user navigates to a store page that displays a business object that supports the click-to-edit function. For example, the store page might display a product, a category, an e-Marketing Spot, or the search results to which a search rule is applied. To display Create and Edit links for the business object, the business user clicks a Show Page Information button at the top of the preview window. For e-Marketing Spots and search rules, there is an extra step; the business user must click a Show Information link that is embedded on the displayed business object to open a pop-up window. The Create and Edit links are embedded on the pop-up window.
  • 3 The business user clicks the Edit link. The code snippet for the link composes an EditBusinessObject Management Center URL. This URL provides the data that is required to retrieve the business object from the server for editing in Management Center. The URL is passed to the callManagementCenter JavaScript function, which submits the request to the Management Center web application.

    To learn more about the code snippet, see Code snippet to add an “Edit” link and Click-to-edit code snippets in the Aurora starter store.

    Customization point: You can add your own Edit links to store pages and store preview pop-up windows.

    WebSphere Commerce DeveloperWebSphere Commerce EnterpriseCustomization point: For an extended site, you can change the default behavior of the Edit link to open the asset store or the extended site store in Management Center. The default behavior displays a prompt for the business user to choose the store.

  • 4 The Management Center web application receives the EditBusinessObject Management Center URL.
  • 5 The EditBusinessObject URL contains a toolId parameter that indicates the correct Management Center tool in which to edit the business object, such as the Catalogs tool. If that tool is not currently open in Management Center, the click-to-edit business logic opens the correct tool. The toolId value must match the id attribute of one of the tools that is found in the following file:

    WCDE_installdir/workspace/LOBTools/WebContent/config/commerce/shell/ApplicationMenuItems.def

    An example of a toolId value is catalogManagement.

  • 6 The EditBusinessObject URL contains a storeId parameter that is used to determine the correct store to open in Management Center. For extended sites, the URL also contains a configurable storePreference parameter that is used together with the storeId parameter to determine which store to open. For more information about the storePreference parameter, see Changing the store preference setting for the click-to-edit function.
  • 7 The searchType parameter and search options that are specified in the EditBusinessObject URL are passed to the Management Center search services to find the business object and open it for editing.

    Customization point: If you are adding click-to-edit support for a custom business object, ensure that your business object has an appropriate search definition that is defined. The definition is required so that the search services can find the business object. The searchType attribute of the business object definition (wcfObjectDefinition) associates a search definition with an object definition.

  • 8 Management Center opens the business object for editing in its properties view.