Adding a column to a list view

You can add a column to an existing Management Center list view, such as for displaying information from a custom database table column.

Before you begin

If you are adding a column to display information for a custom property that is mapped to a custom database table column, ensure that you complete the following tasks. These tasks customize the persistence layer and business object manager, which you must customzie before you customize the Management Center user interface.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Expand LOBTools > WebContent > WEB-INF > src > xml > commerce > component > listViewDefinitions, where component is the Management Center component.
  3. Open the definition file that includes the list view definition that you want to change.
    All list view definitions are instances of the object grid definition. Within a list view definition file, all list view definitions are named with the following naming convention LOBTools/WebContent/WEB-INF/src/xml/commerce/component/objectListViewtype, where
    • component is the Management Center component.
    • object is the business object, such as Product.
    • ListViewtype is the type of list view, such as ChildList or NavigationList.
    For example, cmc/catalog/ProductChildSKUList is the definition name for the list view of SKUs for a product.
  4. Within the list view definition that you want to change, update the list of the columns that display in the list view to add your column.
    The columns display in Management Center based on the sequence that the columns are listed in the definition.
    • To add a simple text column, include the <GridText> element in the defintion. For example, the following element defines the product part number or "Code" column.
      
      <GridText editable="true" name="partnumber" propertyName="partnumber" required="true" 
       text="${catalogResources.productPartnumber_ColumnHeader}" visible="true" width="90"/>
    • To add a column that supports a combination box, so that business users can select a value for the column, include the <GridComboBox> element in the definition. For example, the following element defines the unit of measure column for attribute dictionary attributes.
      
      <GridComboBox editable="true" enableFilter="true" name="xdescdata_UnitOfMeasure" 
       objectPath="AttributeDictionaryAttributeDescription" propertyName="xdescdata_UnitOfMeasure" required="false" 
       text="${catalogResources.attributeValueUnitOfMeasure}" visible="false" width="130"/>
  5. Save and publish your changes.