Creating the properties view for the campaign element

If your new campaign element requires input from business users, declare the widgets to capture that input. By doing this, you create the user interface, called the properties view, for the new campaign element. In the Activity Builder, a campaign element's properties view displays below the work area when you click the campaign element.

Before you begin

Review the following topics to ensure that you understand the properties view widgets available for use in Management Center and the mktFlowElementProperties class that you must extend:

About this task

The properties view for a new campaign element is:
  • WebSphere Commerce Version 7.0.0.0Feature Pack 1an extension class of the mktFlowElementProperties class
  • Introduced in Feature Pack 2a definition that extends the wcfFlowElementProperties class
The properties view widgets have already been defined for use in the Management Center. When creating a new campaign element, you must specify which of these widgets you need, and then arrange and customize them as required.

Procedure

  1. Review the available widgets for Management Center properties views and plan the user interface for your campaign element.
  2. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  3. Create a directory to store your new properties view file.
    Use a directory structure similar to the following example:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1LOBTools/WebContent/WEB-INF/src/lzx/your_company_name/marketing/propertiesViews/activityBuilder/
    • Introduced in Feature Pack 2LOBTools/WebContent/config/your_company_name/marketing/propertiesViews/activityBuilder/
  4. Create the new properties view file:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1OpenLaszlo class file WebSphere Commerce Version 7.0.0.0Feature Pack 1Name the file using this syntax: campaign_element_namePropertiesView.lzx; for example, CustomLevelOfSupportPropertiesView.lzx.
    Introduced in Feature Pack 2Definition file Introduced in Feature Pack 2Name the file using this syntax: campaign_element_namePropertiesView.def; for example, CustomLevelOfSupportPropertiesView.def.
  5. Define the new properties view as:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1An extension class of mktFlowElementProperties WebSphere Commerce Version 7.0.0.0Feature Pack 1For example:
    <class name="extCustomLevelOfSupportProperties" extends="mktFlowElementProperties">
    	<wcfPropertyGroup name="group" collapsable="false">
    		<wcfPropertyCombobox promptText="Support level" propertyName="supportLevel"/>
    	</wcfPropertyGroup>
    </class>

    More complex properties views require multiple widgets. Another option is tabs. Consider using the properties view of an existing, similar campaign element as a starting point for your new campaign element. The existing properties view files are stored here:

    LOBTools/WebContent/WEB-INF/src/lzx/commerce/marketing/propertiesViews/activityBuilder/

    Introduced in Feature Pack 2An extension of wcfFlowElementProperties Introduced in Feature Pack 2For example:
    <FlowElementProperties definitionName="extCustomLevelOfSupportProperties"> 
    	<PropertyGroup name="group" collapsable="false">
    		<PropertyCombobox promptText="Support level"
    			propertyName="supportLevel"/>
    	</PropertyGroup>
    </FlowElementProperties>

    More complex properties views require multiple widgets. Another option is tabs. Consider using the properties view of an existing, similar campaign element as a starting point for your new campaign element. The existing properties view files are stored here:

    LOBTools/WebContent/config/commerce/marketing/propertiesViews/activityBuilder/

  6. WebSphere Commerce Version 7.0.0.0Feature Pack 1Add a reference to the new properties view file in the MarketingExtensionsLibrary.lzx file.

    The file is stored at this path:

    LOBTools/WebContent/WEB-INF/src/lzx/commerce/marketing/

    The line of code that references the new properties file should look like the following example:

    <include href="../../your_company_name/marketing/propertiesViews/activityBuilder/campaign_element_namePropertiesView.lzx"/>