Develop > Presentation layer > Management Center framework > Customize the Management Center user interface > Create a new tool for the Management Center > Define OpenLaszlo classes instantiated in a tool definition class


Define search

When you open a tool and select a store, the Management Center framework populates the search type list in the find area with the search definitions that are defined as child elements of the business object editor. When the business user searches for business objects, the selected search definition is used to invoke the correct search service and display the results in the main work area.


Before you begin

Before defining a search definition:

  1. Review the wcfSearchDefinition class.

  2. Create the Management Center service that will return business objects that match search criteria specified by the business user. See Load services for more information.

  3. Define properties files and bundle keys for user interface text

Tip: This task file provides the generic steps for defining a search definition. For a tutorial on this topic, refer to Tutorial: Adding new search conditions in the advanced search of the Catalogs tool.

To define search:


Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  2. In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx.

  3. Create a directory to store the new OpenLaszlo library file. Use a directory structure similar to the following example: LOBTools/WebContent/WEB-INF/src/lzx/your_company_name/Management_Center_component/searchDefinitions, where Management_Center_component is the name of the new custom tool.

  4. Create an OpenLaszlo search library file with this syntax: Management_Center_componentname in camel caseSearchDefinition.lzx. For example, FindProductsSearchDefinition.lzx. Within this file, the class name must follow this syntax: three-character Management Center component code in lower caseFindManagement_Center_componentobject type. For example, catFindProducts. For example:

    <class name="extFindMyPrimaryObjectsSearchDefinition" 
        extends="wcfSearchDefinition" 
        searchType="FindMyPrimaryObjects" 
        displayName="${myResources.findMyPrimaryObjectsSearchDefinition_DisplayName.string}" 
        listClass="extMyPrimaryObjectSearchGrid" 
        listTitle="${myResources.myPrimaryObjectChildListTitle.string}" 
        
       
    <wcfSearchService name="findMyPrimaryObjects" url="/cmc/FindMyPrimaryObjects"> 
    
           
    <wcfServiceParam name="storeId"/> 
           
    <wcfServiceParam name="masterCatalogId"/> 
    
       
    </wcfSearchService> 
    
    </class> 
    

  5. Define a list view that will display the search results. The listClass attribute of the search definition uses the class name of the list view.


What to do next

After you complete the work:

  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the WCDE_INSTALL\workspace\LOBTools\WebContent directory. This is the default environment setting.

  2. Test the work by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.

  3. Deploy your files to the production environment.


Related concepts

Management Center user interface


Related tasks

Create a new tool for the Management Center

Define OpenLaszlo classes instantiated in a tool definition class


+

Search Tips   |   Advanced Search