Configure double-click handling

We can configure double-click handling on an instance, on a Web module, or we can define specific URL requests.


Task info

Note:


Procedure

Configure double-click handling using one of these methods:

Option Description
Enable or disabling double-click handling for an entire WebSphere Commerce instance Open the WebSphere Commerce configuration file and find the EnableDoubleClickHandler attribute. Setting the attribute to a value of true means that double-click support is enabled globally. A value of false disables this feature.The following snippet of configuration shows the WebSphere Commerce configuration file where double-click is enabled:

    ...

    <Instance
          ...
          DistributorProxyOrgDN="ou=distributor proxy
    organization,o=demand chain management organization,o=root
    organization"
          
    EnableDoubleClickHandler="true"
          FrameSupported="true"
          ...
          WCSInstallDir=".." WorkspacePath="../workspace"/>

    ...

Enable or disabling double-click handling for a Web module

  1. Open the WebSphere Commerce configuration file.

  2. For the module we want to enable or disable double-click handling on, edit the InitParameters element. Change the handleDoubleClick element to true to enable double-click handling, or false to disable it. For example, to enable double-click handling for the Stores Web module:

      <Module contextPath="/webapp/wcs/stores"
           fileServletEnabled="false" name="Stores"
           urlMappingPath="/servlet" webAlias="/wcsstore">
           <InitParameters adapters="XML/HTTP, BrowserAdapter"
               contextSetName="Store" 
      handleDoubleClick="true"/>
      </Module>

Defining URL requests that require double-click checking

The double-click feature must be globally enabled in order to achieve this configuration. By identifying particular commands to include or exclude double-click support, we are choosing the default behavior for all URL request with the exclusion of a select group. For example, if you decide to exclude specific commands from double-click processing, we are indicating that the default behavior is double-click enabled but the processing does not apply to these URL requests. The same goes for the include list where double-click processing will not apply by default except to the specified URL requests. By specifying both an include list and an exclude list, the default behavior is to exclude double-click support except for the specified commands.

Specifying the commands to include and exclude double-click support is done by adding a DoubleClickMonitorCommands node to the WebSphere Commerce configuration file. This node will specify the inclusion and exclusion list for commands that do or do not require double-click processing.

The following configuration snippet demonstrates the configuration required to exclude certain URL requests. This configuration node is added to the end of the WebSphere Commerce configuration file.

Important: We must disable DoubleClickHandler for the cacheable pages. Incorrect cache content can result if cacheable pages are not included in the exclusion list.

    ...
    <DoubleClickMonitoredCommands>                  
          <excludeCommands>                          
               <command name="StoreCatalogDisplay" /> 
               <command name="TopCategoriesDisplay" />
               <command name="CategoryDisplay" />     
               <command name="ProductDisplay" />      
               <command name="ContentView" />         
               <command name="HelpView" />            
          </excludeCommands>                         
      </DoubleClickMonitoredCommands>
    </config> 

The following configuration snippet demonstrates the configuration required to include certain URL requests. This configuration node is added to the end of the WebSphere Commerce configuration file.

     ...
    <DoubleClickMonitoredCommands>    
          <includeCommands>                          
               <command name="OrderItemAdd" /> 
               <command name="OrderPrepare" />
               <command name="OrderProcess" />     
               <command name="OrderCopy" />      
               <command name="InterestItemAdd" />         
          </includeCommands>                         
      </DoubleClickMonitoredCommands> 
    </config>


What to do next

Package our changes to the WebSphere Commerce configuration file for deployment.


Related concepts
Double-click handling in WebSphere Commerce


Related reference
Double-click handling on the client-side using JavaScript