WebSphere Commerce EnterpriseWebSphere Commerce Professional

Declaring a dynamic ID

You might not always want to have the same identifier for an extension definition. There are cases where the choice as to which extension definition should be used needs to be made dynamically. Locale or store are one of the criteria by which you may want to use different name or address user interface elements.

Procedure

  1. Create a plug-in to be used for extensions.
  2. In the plugin.xml file of your new plugin, declare the dynamic ID using the com.ibm.commerce.telesales.dynamicIds extension point. For example:
    
    <extension point="com.ibm.commerce.telesales.dynamicIds">
       <dynamicId
          id="customerNameCompositeDefinition"
         
    resolverId="com.ibm.commerce.telesales.ui.localeSensitiveIdResolver"/>
       <dynamicId
          id="customerAddressCompositeDefinition"
         
    resolverId="com.ibm.commerce.telesales.ui.localeSensitiveIdResolver"/>
       <dynamicId
          id="customerIdentityCompositeDefinition"
         
    resolverId="com.ibm.commerce.telesales.ui.storeTypeSensitiveIdResolver"/>
    </extension>
    

Results

The declaration includes the ID (the resolverID) of a dynamic IdResolver which will be responsible for actually resolving the dynamic ID into the ID of a valid extension declaration. A locale sensitive and a store sensitive dynamic ID resolver are declared in the com.ibm.commerce.telesales.ui plug-in.