Defining a list view

A list view lists objects in the form of a table, providing selected information about the object, within table cells (for example, a list of promotions, showing the name, start and end dates, and status). Reorder, hide, or show columns in the list view. If information is editable make changes directly from the list view.

Before you begin

The framework uses list views to display a lists of objects in the main work area. The list of objects can be a list of search results or it can be a list of objects that are related to the object currently selected in the explorer view.

If the Search Results node is selected in the explorer view, then the framework uses the listClassIntroduced in Feature Pack 2 or listDefinitionName attribute of the current search definition ( lzx/commerce/foundation/restricted/SearchDefinition.lzx/wcfSearchDefinition) to determine which list view to display in the main work area. For search results, the list view is always an instance of wcfObjectGrid.

If an object node is selected in the explorer view, then the framework uses the listClass or listDefinitionName attribute of the current navigation list definition (wcfNavigationListDefinition) to determine which list view to display in the main work area. Navigation list views are defined as part of the selected object's object definition (wcfObjectDefinition). The list view for a navigation list definition can be either a child list editor (wcfChildListEditor ) or a reference list (wcfReferenceList). A child list is a list of objects that belong to the same parent object, such as a list of products within a category. A list of references is a list of all the objects that have the current object as a child, such as a list of activities that refer to the current e-Marketing Spot.

When you declare a child list editor or a reference list, you must specify a value for the listClass or listDefinitionName attribute. This is a class or a definition that extends wcfObjectGrid.

About this task

To define list views for a Management Center object:

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Complete one of the following steps:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > your_company_name > Management_Center_component > listViewDefinitions, where Management_Center_component is the name of your new custom tool.
    • Introduced in Feature Pack 2In the Enterprise Explorer view, expand LOBTools > WebContent > config > your_company_name > Management_Center_component > listViewDefinitions, where Management_Center_component is the name of your new custom tool.
  3. Create a new list view file:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1OpenLaszlo list view library file WebSphere Commerce Version 7.0.0.0Feature Pack 1Use the following syntax to create this file: extObjectTypeGrid.lzx.
    Introduced in Feature Pack 2List view definition file Introduced in Feature Pack 2Use the following syntax to create this file: extObjectTypeGrid.def.
  4. Within this new list view file:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1OpenLaszlo list view library file WebSphere Commerce Version 7.0.0.0Feature Pack 1
    1. Define a class that extends wcfObjectGrid. If the list view is a list of child objects or a list of reference objects, define a class that extends wcfChildListEditor or wcfReferenceList and set the listClass attribute to the name of the class that extends wcfObjectGrid.
    2. Define columns within the wcfObjectGrid class. There are several classes that extend wcfGridColumn that can be used to define different types of columns in the list view. For example, use lzx/commerce/foundation/restricted/GridColumn.lzx/wcfGridText to define a column that displays simple text and lzx/commerce/foundation/restricted/Checkbox.lzx/wcfGridCheckbox to define a column that displays check boxes. When defining the columns you need to be aware of the type of objects in the list. Search results, reference lists and child lists under organizational objects are all primary objects (wcfPrimaryObjectDefinition). Child lists under primary objects are reference objects (lzx/commerce/foundation/restricted/ObjectDefinition.lzx/wcfReferenceObjectDefinition). When you define a column for a list of reference objects, you must specify an object path to display properties of the referenced primary object.
    3. If you are defining a search results list view, specify the name of the class that extends wcfObjectGrid as the listClass attribute of the appropriate search definition (wcfSearchDefinition). If you are defining a list view for a list of objects related to the object currently selected in the explorer view, specify the name of the class that extends wcfChildListEditor or wcfReferenceList as the listClass attribute of the appropriate navigation list definition (wcfNavigationListDefinition).
    Introduced in Feature Pack 2List view definition file Introduced in Feature Pack 2
    1. Create a definition that extends wcfObjectGrid. If the list view is a list of child objects or a list of reference objects, create a definition that extends wcfChildListEditor or wcfReferenceList and set the listDefinitionName attribute to the name of the definition that extends wcfObjectGrid.
    2. Define columns within the ObjectGrid definition. There are several classes that extend wcfGridColumn that can be used to define different types of columns in the list view. For example, use wcfGridText to define a column that displays simple text and wcfGridCheckbox to define a column that displays check boxes. When defining the columns you need to be aware of the type of objects in the list. Search results, reference lists and child lists under organizational objects are all primary objects (wcfPrimaryObjectDefinition). Child lists under primary objects are reference objects (wcfReferenceObjectDefinition). When you define a column for a list of reference objects, you must specify an object path to display properties of the referenced primary object.
    3. If you are defining a search results list view, specify the name of the definition that extends wcfObjectGrid as the listDefinitionName attribute of the appropriate search definition (wcfSearchDefinition). If you are defining a list view for a list of objects related to the object currently selected in the explorer view, specify the name of the definition that extends wcfChildListEditor or wcfReferenceList as the listDefinitionName attribute of the appropriate navigation list definition (wcfNavigationListDefinition).

What to do next

After you complete your customization:
Version Steps
  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent directory. This setting is the default environment setting.
  2. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  3. Deploy your changes to your production environment.
Introduced in Feature Pack 2
  1. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  2. Deploy your changes to your production environment.