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 a filter

When you open a tool and select a store, the Management Center framework populates the explorer view with each child of the top object. Filters are used to control the set of child objects that are visible in the explorer view.


Before you begin

Before defining a filter, review the following classes:

To define a filter:


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, where Management_Center_component is the name of the new custom tool.

  4. Create an OpenLaszlo filter library file with this syntax: Management_Center_componentname in camel caseFilterDefinitions.lzx. For example, CatalogManagementFilterDefinitions.lzx. Within this file, the class name must follow this syntax: three-character Management Center component code in lower caseManagement_Center_componentFilter. For example, catMasterCatalogGroupsFilter.

  5. Within the filter library file:

    1. Extend a class that extends wcfFilter. For example, extend the wcfObjectTypeFilter class.

    2. Specify the following attributes:

      filterType

      Used by the Management Center framework to identify the filter.

      displayName

      Used as the text in the filter selector list.

      objectTypes

      Identifies the objects that are visible in the explorer view when the filter is active.
      The following code snippet shows an example of these attributes defined within the new class:

      <class name="catMasterCatalogGroupsFilter" extends="wcfObjectTypeFilter" 
          filterType="MasterCategories" 
          displayName="${catalogResources.masterCategoriesFilterTitle.string}" 
          objectTypes="UnassignedCatalogEntries,Catalog,InheritedCatalog,ChildCatalogGroup,ChildInheritedCatalogGroup" />
      

    3. Instantiate the new class as a child of the wcfBusinessObjectEditor instance:

      <class name="extMyTool" extends="wcfBusinessObjectEditor"> 
      
      ... 
      
      <!—- Add the instantiations for the filter definitions --> 
      <extMyFilter/> 
      
      ... 
      
      </class> 
      

  6. Add this new filter library file to the application.


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