Feature Pack 7 or later

Define the properties view definition for widget

In this lesson, you create the properties view definition for your custom widget. The definition file specifies how to render the Management Center properties view for your widget. The properties view for your widget contains the configurable properties that business users can set when the widget is included in a page layout. The configurable properties are used to set the information that determines the rendering of the widget and the rendering of the data within the widget on a store page.

Procedure

  1. In the Enterprise Explorer view, go to the LOBTools\WebContent\config\mycompany\pagelayout\widgetDefinitions\ShoppingCartDetailPageWidget directory within your default workspace directory structure.
  2. Open the WidgetPropertiesView.def file for editing.
    By default the generated code for your widget object definition can resemble the following code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <!-- The following code is created as example. Modify the generated code and add any additional required code. -->
    
    <Definitions>
    
    <GridObjectProperties definitionName="plmWidgetProperties_ShoppingCartDetailPageWidget">
      <PropertyPane>
        <PropertyGroup name="widgetProperties" collapsable="false" groupTitle="${plmPageLayoutResources.widgetPropertiesPrompt}">
          <PropertyInputText name="${plmPageLayoutResources.widgetNamePrompt}" propertyName="widgetName"
          promptText="${plmPageLayoutResources.widgetNamePrompt}" />
        </PropertyGroup>
        <PropertyGroup name="contentProperties" collapsable="false" groupTitle="${plmPageLayoutResources.widgetContentPrompt}">
          <PropertyStaticText text="${mycompanyPageLayoutResources.ShoppingCartDetailPageWidgetContent}" />
        </PropertyGroup>
      </PropertyPane>
    </GridObjectProperties>
    
    </Definitions>
    The preceding code sample defines a properties view for the new widget, which consists of only the widget name and the content description.
  3. Update the properties view definition file to change any of the default generated configurable properties, or add more configurable properties for your widget.

    For more information about properties view definition files, see Property definitions. For more information about updating these files, see Adding a tab to a properties view

  4. Save and close the file.
  5. Start or restart the WebSphere Commerce Test Server.
  6. Right-click the LOBTools project. Click Build OpenLaszlo Project.