Commerce Composer widget properties
By default, the widgets that are available for use with the Commerce Composer tool can include properties that a developer can define, or Management Center user can configure. When you are creating a custom widget, you can define your widget to include any of these properties, or you create your own custom properties.
- To provide users with the capability to control the data that shows within a widget, and control how a widget displays in the storefront. For example, you can define widget orientation property for a widget so users can determine whether the widget displays content horizontally or vertically.
- To control more display behavior and functional or a widget, that users are not provided the capability to control. For example, you can define a widget restriction group property for a widget to determines which layout template slots that users can include the widget within when they are creating a layout.
- To identify the logic and assets that are required for the widget to function. For example, you can use a basic name-value pair property to identify a JavaScript file that a widget must include for the widget to function properly.
- Use the object and properties view definitions for existing Commerce Composer widgets to model the Management Center display of the properties for your widget. For more information about defining the Management Center assets for a widget, see Adding Management Center support for a Commerce Composer widget.
- Use the storefront asset definitions for existing widgets to model the storefront display and usage of the properties for your widget. For example, the storefront presentation of the orientation of widgets is defined within a UI provider JSP file. For more information about defining the storefront presentation, function, and assets for a widget, see Defining storefront assets for a Commerce Composer widget
- Use the definition XML of existing widgets to help you model the definition XML of basic name-value pair properties for your widget. Basic widget name-value pair properties are stored within the PLWIDGETNVP database table. For more information about creating the definition XML for a widget, see Registering a Commerce Composer widget. For properties that you want to be configurable by business users, you must define the Management Center display and support for the property within the properties view for your widget.
- If the properties are more complex than a name-value pair property, or the values for the properties are not stored within the PLWIDGETNVP, you must define a widget manager class to handle storing the value for the properties. Review the widget manager classes for existing widgets to help you define how your widget manager class must handle properties that are more complex than basic name-value pairs. For more information about creating a widget manager class, see Defining a Commerce Composer widget manager class.
When you are defining the properties view definition for the configurable properties that you want to include in the Commerce Composer tool, you can define the properties to display in different ways. For instance, you can define the properties so that users can select the value for the properties using radio buttons, check boxes, combination boxes, and more. For more information, see ../../com.ibm.commerce.management-center_customization.doc/refs/rtfcmcwidgetsample.html.
- If you define the properties to be editable within Management Center, business users can configure the properties for the widget within the Commerce Composer tool.
- If the properties are defined within the definition XML for the widget, you can use the Data Load utility to update the definition XML with values for the properties.
- If the property is not defined to be editable within Management Center, you can define a value for the widget within the object definition for the widget. You can also define default values for properties that are editable in Management Center within the object definition file for a widget. Users can set a different value with the Commerce Composer tool, and administrators can set a different value with the Data Load utility.