Tutorial: Extending simple search in the Catalogs tool
In this tutorial module, you use the data service layer to generate your parametric Simple catalog search search queries for you. The queries are specified by using configuration files that are called query template files. This method of creating search queries is appropriate for developers who do not want to write their own SQL.
This tutorial is the continuation of Tutorial: Adding fields in the Catalogs tool and Tutorial: Adding search conditions for advanced search in the Catalogs tool. You continue customizing the Management Center, to perform cross-column wildcard searches on warranty and care instruction information of catalog entries and catalog entry descriptions. This information is stored in the columns of two tables: XWARRANTY and XCAREINSTRUCTION. These tables are created in Tutorial: Adding fields in the Catalogs tool.
Extending simple catalog search consists of two steps:
- Extend the DSL configuration to support searches on the data in the new custom tables.
- Extend the search widget in Catalogs tool to include the new search definition so that it sends the new XPath queries to the server for processing.
To create a search definition, see Changing the search definition for a business object.
Learning objectives
After completing this tutorial, you should be familiar with the following concepts:
- Simple catalog search
- Catalog queries
- The expression builder
- wcfSearchDefinition
- wcfSearchService
After you complete this tutorial, you understand how to complete the following tasks:
- Configure parametric search to include custom tables
- Update the search widget in the Catalogs tool to include new search definition
- Create a controller JSP file to retrieve and mediate the Management Center object
- Create an ExpressionBuilder in get-data-config.xml to call the new query and pass query parameters.
Time required
Expect this tutorial to take two hours to complete.
Skill level
This tutorial is intended for advanced WebSphere Commerce developers who are responsible for creating and customizing WebSphere Commerce SOA services and customizing the Management Center user interface. To complete this tutorial, familiarize yourself with the following terms and concepts:- WebSphere Commerce Developer
- The Management Center for WebSphere Commerce programming model
- The OpenLaszlo programming API to extend the wcfSearchDefinition class
- The Java programming language
- GetData tag configuration
- JSP pages
- HTML
- XML
- Struts configuration
System requirements
Before you start this tutorial, complete the following tasks:
- Install WebSphere Commerce Developer version 7.
- Enable the management-center feature.
- Create a Category Manager.
- Complete the Adding new properties to a WebSphere Commerce service by using the data service layer tutorial.
- Complete the Tutorial: Adding fields in the Catalogs tool tutorial.
- Complete the Tutorial: Adding search conditions for advanced search in the Catalogs tool tutorial.
Tutorial resources
- Download the completed tutorial code for WebSphere Commerce Version 7 and Feature Pack 1.
- Download the completed tutorial code for WebSphere Commerce Version 7 Feature Pack 2 and Feature Pack 3.