Tutorials > Sales Center > Add a new search option in the IBM Sales Center
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
- In the Enterprise Explorer view, navigate to the myNewExtensionsPlugin project.
- Inside the project double-click the plugin.xml file to open the plug-in for editing.
- Click the Extensions tab.
- Click Add.
- From the Available Extension Point list, select com.ibm.commerce.telesales.widgets.tableDefinitions.
- Click Finish.
- Right-click com.ibm.commerce.telesales.widgets.tableDefinitions and select New > tableDefinition.
- In the Extensions Element Details pane, set the id to findProductSearchResultsTableDefinition.
- Right-click findProductSearchResultsTableDefinition and select New > column.
- In the Extensions Element Details pane:
- Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductProductTypeTableColumn.
- Clear the alignment value.
- Save the file.
- Right-click findProductSearchResultsTableDefinition and select New > column.
- In the Extensions Element Details pane:
- Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductProductIdTableColumn.
- Clear the alignment value.
- Right-click findProductSearchResultsTableDefinition and select New > column.
- 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
- Save the file.
- Right-click findProductSearchResultsTableDefinition and select New > column.
- In the Extensions Element Details pane:
- Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductManufacturerTableColumn.
- Clear the alignment value.
- Right-click findProductSearchResultsTableDefinition and select New > column.
- In the Extensions Element Details pane:
- Set the referenceId value to com.ibm.commerce.telesales.ui.impl.findProductUnitPriceTableColumn.
- Clear the alignment value.
- Save the file.
- 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>