Tutorials > Sales Center > Add a column to the order items table

< Previous | Next >


Create a new definition for the user interface widget

In this step we will create the own definition of the order items table. In a later step in this tutorial we will use the system configurator to indicate the IBM Sales Center should display this definition, not the default definition.


Procedure

  1. Click the Extensions tab.

  2. Click Add.

  3. From the Available Extension Point list, select com.ibm.commerce.telesales.widgets.tableDefinitions. This is the extension point for creating a new table definition.

  4. Click Finish.

  5. Right-click com.ibm.commerce.telesales.widgets.tableDefinitions and select New > tableDefinition.

  6. In the Extensions Element Details pane:

    1. Set the id to customizedItemTable

    2. Set the referenceId value to com.ibm.commerce.telesales.ui.impl.orderItemPageTableDefinition.default and save the changes.

      Recall the information you determined in the Determine the ID of the user interface widget to modify step. The referenceId is the default table definition defined in plug-in com.ibm.commerce.telesales.ui.impl.order. Since the new table is the same as the old table with one new availability date column, you use the referenceId to reference the existing column definitions instead of re-defining them in this plug-in.

  7. Right-click customizedItemTable and select New > column.

  8. In the Extensions Element Details pane, set the following values:

    Name Value
    Id availabilityDate
    Alignment LEFT
    Text extendedOrderItem.availabilityDate
    minimumWidth 20
    Resizable True
    managerType standard
    modelPath product.availabilityDate

    This creates the new column with the Id of availabilityDate. The text for the column references the properties file entry created previously. The modelPath value defines how the column is populated, the first part of the model path describes the model. The second part of the modelPath value is an attribute of the model. In this case the value represents the name of the name value pair we will read from the BOD. The remaining properties define column attributes.

  9. Save the changes.

  10. Right-click availabilityDate and select New > property.

  11. In the Extensions Element Details pane, set the following values:

    Name Value
    name columnType
    value com.ibm.commerce.telesales.ui.impl.orderItemPageItemTableAvailabilityDate

  12. Save the file.

  13. Click the plugin.xml tab and examine the table definition's source code:

    <tableDefinition 
           
    referenceId="com.ibm.commerce.telesales.ui.impl.orderItemPageTableDefinition.default"
            >
    <column 
            resizable="true"
            text="extendedOrderItem.availabilityDate"
            managerType="standard"
            minimumWidth="20"
            alignment="LEFT"
            modelPath="product.availabilityDate"
            >
           
    <property
                   
    value="com.ibm.commerce.telesales.ui.impl.orderItemPageItemTableAvailabilityDate"
                    name="columnType"/> 
    </column>
    </tableDefinition>
     
            
    

                       
     
            
     
    

< Previous | Next >


+

Search Tips   |   Advanced Search