Creating properties view widgets

The properties view for business objects can display different widgets for displaying and editing business object properties. If your business users need to view different properties in properties views, you can create a properties view widget to meet your business user needs.

About this task

The following diagram illustrates the process for creating properties view widgets.

Creating a properties view widget
To create a properties view widget, you must extend the PropertyEditor class. By extending this class, your new widget becomes an editor within a properties view.

Procedure

  1. Open HCL Commerce Developer and switch to the Enterprise Explorer view.
  2. Create a class that is named extWidgetType that extends the base component class definition, where WidgetType is the name of your new widget type.
    1. Create and support an attribute that is named property, which is an instance of the model property definition.
    2. Register a delegate to listen to the onvalue event on that property and update the display of the property to reflect the new value if the property changes.
    3. When the business user changes the property value, call the model property change method.
  3. Create an extPropertyWidget class that extends the PropertyEditor definition and create an instance of the WidgetType class by overriding the create editor method. By extending the PropertyEditor class, your new widget becomes a valid component of a properties view. Your extPropertyWidget class can now be used to define the widget inside a properties view.