HCL Commerce Enterprise

Creating the properties view for the price rule element

If your new price rule 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 price rule element. In the Price Rule Builder, the properties view for a price rule element displays below the work area when you click the price rule element.

Before you begin

To ensure that you understand the properties view widgets available for use in Management Center, review Creating widgets in Management Center: see the list of properties view widgets in this topic.

About this task

To create a properties view for a new price rule element, you must create an XML file containing a definition that uses the <FlowElementProperties> element. The properties view widgets available to you have already been defined for use in the Management Center. When creating a new price rule 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 price rule element.
  2. Open HCL Commerce Developer and switch to the Enterprise Explorer view.
  3. Create a directory to store your new properties view definition file.
    Use a directory structure similar to the following example:

    LOBTools\WebContent\WEB-INF\src\xml\your_company_name\price\propertiesViews\priceRuleBuilder

  4. Create a new XML file for the price rule element object definition. Name the file using this syntax:

    pricerule_element_namePropertiesView.xml; for example,

    RegistrationTimeConditionPropertiesView.xml

  5. Define the new properties view using the FlowElementProperties element.
    Here is a simple example:
    <Definitions>
        <FlowElementProperties definitionName = "prcRegistrationTimeConditionElementProperties">
            <PropertyGroup collapsable = "false" name = "RegistrationTimeCondition">
                <PropertyRadioGroup helpText = "" promptText = "${prcMyPriceResources.RegistrationTimeCondition_promptText}" propertyName = "registrationTimeOperator"/>
                <PropertyDatePicker promptText = "${prcMyPriceResources.RegistrationTimeCondition_TimePromptText}" propertyName = "registrationTime"/>
            </PropertyGroup>
        </FlowElementProperties>
    </Definitions>

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

    LOBTools\WebContent\WEB-INF\src\xml\commerce\price\propertiesViews\priceRuleBuilder

  6. Ensure that the definitionName value you have specified for this properties view definition matches the propertiesDefinitionName value in the object definition you created in the previous procedure.