Changing the search definition for a business object

You can change the search definition for a business object.

About this task

To change the search definition for a business object:

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Complete one of the following steps:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > commerce > Management_Center_component > searchDefinitions, where Management_Center_component is the name of the tool you want to customize. All search definitions for objects managed by the Management Center are stored in this directory. All search definitions are named beginning with the Management_Center_component, the name of the search definition in camel case, followed by SearchDefinition.lzx. For example, FindProductsSearchDefinition.lzx.
    • Introduced in Feature Pack 2In the Enterprise Explorer view, expand LOBTools > WebContent > config > commerce > Management_Center_component > searchDefinitions, where Management_Center_component is the name of the tool you want to customize. All search definitions for objects managed by the Management Center are stored in this directory. All search definition files are named beginning with the Management_Center_component, the name of the search definition in camel case, followed by SearchDefinition.def. For example, FindProductsSearchDefinition.def.
  3. Open the file that you want to change:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1OpenLaszlo (.lzx) file that contains the search definition WebSphere Commerce Version 7.0.0.0Feature Pack 1Modify the search definition. You can make various changes to the search definition. For example:
    • To change the displayName, change the applicable property file and associated resource bundle.
    • To change the listClass, define a new list class for the search results.
    • To change the listTitle, define the new title name in a property file and associated resource bundle file.
    • To change the advancedSearchContentClass, define a new advanceSearchContent class.
    The following example shows how a search definition is used for the Catalogs tool:
    <class name="catFindAllCategoriesSearchDefinition" extends="wcfSearchDefinition" 	searchType="FindCategories"
    		displayName="${catalogResources.findCategoriesSearchDefinition_DisplayName.string}"  
    		isDefault="false"  listClass="catCategorySearchGrid"  listTitle="${catalogResources.categorySearchTitle.string}" 
    		advancedSearchContentClass="catCategoriesAdvancedSearchContent"> 
    				<wcfSearchService name="findAllCategories" url="/cmc/FindCategories-All">
    						<wcfServiceParam name="storeId"/> 
    						<wcfServiceParam name="masterCatalogId"/>
    				</wcfSearchService> 
    </class>  
    Introduced in Feature Pack 2Definition file (.def) that contains the search definition Introduced in Feature Pack 2Modify the search definition. You can make various changes to the search definition. For example:
    • To change the displayName, change the applicable property file and associated resource bundle.
    • To change the listDefinition name, define a new list definition for the search results.
    • To change the listTitle, define the new title name in a property file and associated resource bundle file.
    • To change the advancedSearchContentClass, define a new advanced search content class.
    The following example shows how a search definition is used for the Catalogs tool:
    <SearchDefinition advancedSearchContentClass="catCategoriesAdvancedSearchContent"
    		definitionName="FindCategories"
    		displayName=
    			"${catalogResources.findCategoriesSearchDefinition_DisplayName}"
    		icon="catalogGroupIcon" listDefinitionName="catCategorySearchGrid"
    		listTitle="${catalogResources.categorySearchTitle}"
    		searchType="FindCategories"
    		tooltip="${catalogResources.searchCategoriesTooltip}"
    		utilitiesListDefinitionName="catCategoryUtilitiesSearchGrid">
    		<SearchService name="findAllCategories" url="/cmc/FindCategories-All">
    			<ServiceParam name="storeId"/>
    			<ServiceParam name="masterCatalogId"/>
    			<ServiceParam name="masterCatalogIdentifier"/>
    			<ServiceParam name="masterCatalogStoreId"/>			
    		</SearchService>
    	</SearchDefinition>
  4. If you use a resource bundle for your Management Center search definitions, see Defining properties files and bundle keys for user interface text for more information about using a resource bundle to define search definitions.

What to do next

After you complete your customization:
Version Steps
  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent directory. This setting is the default environment setting.
  2. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  3. Deploy your changes to your production environment.
Introduced in Feature Pack 2
  1. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  2. Deploy your changes to your production environment.