Adding the new search definition into the search widget in the Catalogs tool
After you define the new search definition, you need to add it into the search widget of the Catalogs tool as a new search option. There are several existing search options in the current Catalogs tool, such as All Catalog Entries Except SKU, All Catalog Entries, Categories, Products.
These options are already defined in:- The Catalogs tool search definition class.
- The Catalogs tool definition.
About this task
- Locate the Catalogs tool search definition class and add your new search definition class into the search definitions section.
- Locate the Catalogs tool definition and add your new search definition into the search definitions section.
Procedure
- Complete one of the following steps:
- In the Enterprise Explorer view, navigate to .
- In the Enterprise Explorer view, navigate to .
- Double-click one of the following files to open it in the
default editor:
Option Description CatalogManagementToolDefinition.lzx In this class file: - Locate the search definitions section:
<!-- Catalog Search Definitions --> <catFindAllCatalogEntriesSearchDefinition isDefault="true" displayName="${catalogResources.findAllCatalogEntriesSearchDefinition_DisplayName.string}"/> <catFindAllCatalogEntriesExceptSKUsSearchDefinition/> <catFindAllCategoriesSearchDefinition/> <catFindProductsSearchDefinition/> <catFindSKUsSearchDefinition/> <catFindBundlesSearchDefinition/> <catFindKitsSearchDefinition/>
- Add your new search definition. You can insert the new search
definition anywhere in the list of search definitions in the search widget.
The search definitions are displayed in reverse order. If you add
your definition to the bottom of the section, it is displayed as the
first option in the search widget. The updated search definition section should
look similar to the following sample:
<!-- Catalog Search Definitions --> <catFindAllCatalogEntriesSearchDefinition isDefault="true" displayName="${catalogResources.findAllCatalogEntriesSearchDefinition_DisplayName.string}"/> <catFindAllCatalogEntriesExceptSKUsSearchDefinition/> <catFindAllCategoriesSearchDefinition/> <catFindProductsSearchDefinition/> <catFindSKUsSearchDefinition/> <catFindBundlesSearchDefinition/> <catFindKitsSearchDefinition/> <!-- Extended search definition --> <extFindAllCatalogEntriesByWarrantySearchDefinition/>
- Save and close the file.
CatalogManagementToolDefinition.def In this definition file: - Locate the search definitions section:
<!-- Catalog Search Definitions --> <SearchDefinition baseDefinitionName="FindAllCatalogEntries" displayName="${catalogResources.findAllCatalogEntriesSearchDefinition_DisplayName}" isDefault="true"/> <SearchDefinition baseDefinitionName="FindAllCatalogEntriesExceptSKUs"/> <SearchDefinition baseDefinitionName="FindCategories"/> <SearchDefinition baseDefinitionName="FindProducts"/> <SearchDefinition baseDefinitionName="FindSKUs"/> <SearchDefinition baseDefinitionName="FindBundles"/> <SearchDefinition baseDefinitionName="FindKits"/>
- Add your new search definition. The updated search definition
section should look similar to the following sample:
<!-- Catalog Search Definitions --> <SearchDefinition baseDefinitionName="FindAllCatalogEntries" displayName="${catalogResources.findAllCatalogEntriesSearchDefinition_DisplayName}" isDefault="true"/> <SearchDefinition baseDefinitionName="FindAllCatalogEntriesExceptSKUs"/> <SearchDefinition baseDefinitionName="FindCategories"/> <SearchDefinition baseDefinitionName="FindProducts"/> <SearchDefinition baseDefinitionName="FindSKUs"/> <SearchDefinition baseDefinitionName="FindBundles"/> <SearchDefinition baseDefinitionName="FindKits"/> <!-- Extended search definition --> <SearchDefinition baseDefinitionName="FindAllCatalogEntriesByWarranty"/>
- Save and close the file.
- Locate the search definitions section:
- Build the project, right-click Build OpenLaszlo Project. . Click