Tutorials > Sales Center > Add a new search option in the IBM Sales Center

< Previous | Next >


Display the new search option in the search result table

To add a new column to the search results table, we will create a new table definition to override the default table definition that you examined in the last step.


Procedure

  1. In the Enterprise Explorer view, navigate to the myNewExtensionsPlugin project.

  2. Inside the project double-click the plugin.xml file to open the plug-in for editing.

  3. Click the Extensions tab.

  4. Click Add.

  5. From the Available Extension Point list, select com.ibm.commerce.telesales.widgets.tableDefinitions.

  6. Click Finish.

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

  8. In the Extensions Element Details pane, set the id to findProductSearchResultsTableDefinition.

  9. Right-click findProductSearchResultsTableDefinition and select New > column.

  10. In the Extensions Element Details pane:

    1. Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductProductTypeTableColumn.

    2. Clear the alignment value.

  11. Save the file.

  12. Right-click findProductSearchResultsTableDefinition and select New > column.

  13. In the Extensions Element Details pane:

    1. Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductProductIdTableColumn.

    2. Clear the alignment value.

  14. Right-click findProductSearchResultsTableDefinition and select New > column.

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

    Name Value
    id findProductManufacturerPartNumberTableColumn
    alignment LEFT
    text extendedFindProductDialog.searchOption
    minimumWidth 20
    resizable true
    width 90
    modelPath manufacturerPartNumber

  16. Save the file.

  17. Right-click findProductSearchResultsTableDefinition and select New > column.

  18. In the Extensions Element Details pane:

    1. Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductManufacturerTableColumn.

    2. Clear the alignment value.

  19. Right-click findProductSearchResultsTableDefinition and select New > column.

  20. In the Extensions Element Details pane:

    1. Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductUnitPriceTableColumn.

    2. Clear the alignment value.

  21. Save the file.

  22. Click the plugin.xml tab and examine the table definition's source code: <extension point="com.ibm.commerce.telesales.widgets.tableDefinitions"> <tableDefinition > <column referenceId="com.ibm.commerce.telesales.ui.impl.findProductProductTypeTableColumn"/> <column referenceId="com.ibm.commerce.telesales.ui.impl.findProductProductIdTableColumn"/> <column width="90" text="extendedFindProductDialog.searchOption" resizable="true" alignment="LEFT" minimumWidth="20" modelPath="manufacturerPartNumber" /> <column referenceId="com.ibm.commerce.telesales.ui.impl.findProductShortDescriptionTableColumn"/> <column referenceId="com.ibm.commerce.telesales.ui.impl.findProductManufacturerTableColumn"/> <column referenceId="com.ibm.commerce.telesales.ui.impl.findProductUnitPriceTableColumn"/> </tableDefinition>

< Previous | Next >


+

Search Tips   |   Advanced Search