Tutorials > Management Center > Add new fields in the Catalogs tool

< Previous | Next >


Add a new column to the product list view

In this lesson, you customize the product list table by adding new property warranty information for catalog entries. You update the list view to include new widgets for the new property.

The following screen capture shows the default Management Center Catalog Entries List.

After completing these steps, a new column, WarrantyTerm, is added to the list view.

Update the list view to include a new widget:


Procedure

  1. Open WebSphere Commerce Developer.

  2. Open Java EE perspective and select the Enterprise Explorer view.

  3. Complete one of the following steps:

    • Navigate to LOBTools > WebContent > WEB-INF > src > lzx > commerce > catalog > listViewDefinitions

    • Navigate to LOBTools > WebContent > config > commerce > catalog > listViewDefinitions

  4. Open one of the following files:

    • CatalogEntryGrid.lzx

    • CatalogEntryGrid.def

  5. Add the new column to the list view. The list columns are defined as XML nodes in:

    Each column can use a different widget to display data. For example:

    • Use the <wcfGridText> tag for simple text and the <wcfGridComboBox> tag to define a list of selectable options.

    • Use the <GridText> tag for simple text and the <GridComboBox> tag to define a list of selectable options.

    Option Description
    Locate the class definition of catCatalogEntryBrowseGrid and add the code for the <wcGridComboBox> tag

    1. Search for the following line: <class extends="wcfObjectGrid" name="catCatalogEntryBrowseGrid" preferenceKey="catCatalogEntryBrowseGrid">

    2. Add the code shown in bold:

      <wcfGridNumeric editable="true" name="sequence"
                  propertyName="sequence" required="false"
                  numDecimalPlaces="1"
                  text="${catalogResources.displaySequence.string}"
                  visible="true" width="130"/>    
      <wcfGridText editable="false" name="catentryId"
                  objectPath="CatalogEntry" propertyName="catentryId"
                  text="${catalogResources.productUniqueId_ColumnHeader.string}"
                  visible="false" width="90"/>
      
      <wcfGridComboBox name="WarrantyTerm" editable="true"
      objectPath="CatalogEntry" propertyName="x_warterm"
      text="${extCatalogResources.productWarranty_ColumnHeader.string}" width="90" visible="true"/> 
      

    Locate the catCatalogEntryBrowseGrid definition and add the code for the <GridComboBox> tag

    1. Search for the following line: <ObjectGrid definitionName="catCatalogEntryBrowseGrid" preferenceKey="catCatalogEntryBrowseGrid">

    2. Add the code shown in bold:

      <GridNumeric editable="true" name="sequence" numDecimalPlaces="1" propertyName="sequence" required="false" text="${catalogResources.displaySequence}" visible="true" width="130"/>    
      <GridText editable="false" name="catentryId" objectPath="CatalogEntry" propertyName="catentryId" text="${catalogResources.productUniqueId_ColumnHeader}" visible="false" width="90"/>
      
      <GridComboBox name="WarrantyTerm" editable="true" objectPath="CatalogEntry" propertyName="x_warterm" text="${extCatalogResources.productWarranty_ColumnHeader}" width="90" visible="true"/>
      

  6. Save the changes.

< Previous | Next >


+

Search Tips   |   Advanced Search