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.
About this task
To create a properties view for a new price rule element,
you must create a definition (.def) 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
- Review the available widgets for Management Center properties
views and plan the user interface for your price rule element.
- Open
WebSphere Commerce Developer and switch to the Enterprise Explorer
view.
- Create a directory to store your new properties view definition
file.
Use a directory structure similar to the following
example:
LOBTools/WebContent/config/your_company_name/price/propertiesViews/priceRuleBuilder/
- Create a new definition file for the price rule element
object definition. Name the file using this syntax:
pricerule_element_namePropertiesView.def
;
for example,
RegistrationTimeConditionPropertiesView.def
- 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/config/commerce/price/propertiesViews/priceRuleBuilder/
- 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.