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 > Defining views for a Management Center object


Define a list view

A list view lists objects in the form of a table, providing selected information about the object, within table cells (for example, a list of promotions, showing the name, start and end dates, and status). Reorder, hide, or show columns in the list view. If information is editable make changes directly from the list view.


Before you begin

The framework uses list views to display a lists of objects in the main work area. The list of objects can be a list of search results or it can be a list of objects that are related to the object currently selected in the explorer view.

If the Search Results node is selected in the explorer view, then the framework uses the listClass attribute of the current search definition (wcfSearchDefinition) to determine which list view to display in the main work area. For search results, the list view class is always an instance of wcfObjectGrid.

If an object node is selected in the explorer view, then the framework uses the listClass attribute of the current navigation list definition (wcfNavigationListDefinition) to determine which list view to display in the main work area. Navigation list views are defined as part of the selected object's object definition (wcfObjectDefinition). The list view class for a navigation list definition can be either a child list editor (wcfChildListEditor) or a reference list editor (wcfReferenceList). A child list is a list of objects that belong to the same parent object, such as a list of products within a category. A list of references is a list of all the objects that have the current object as a child, such as a list of activities that refer to the current e-Marketing Spot.

wcfChildListEditor and wcfReferenceList have a listClass property

To define list views for a Management Center object:


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

  3. Create an OpenLaszlo library file with this syntax: ext<ObjectType>Grid.lzx

  4. Within the library file define a class that extends wcfObjectGrid. If the list view is a list of child objects or a list of reference objects then you also need to define a class that extends wcfChildListEditor or wcfReferenceList and set the listClass attribute to the name of the class that extends wcfObjectGrid.

  5. Define columns within the wcfObjectGrid class. There are several classes that extend wcfGridColumn that can be used to define different types of columns in the list view. For example, use wcfGridText to define a column that displays simple text and wcfGridCheckbox to define a column that displays checkboxes. When defining the columns be aware of the type of objects in the list. Search results, reference lists and child lists under organizational objects are all primary objects (wcfPrimaryObjectDefinition). Child lists under primary objects are reference objects (wcfReferenceObjectDefinition). When you define a column for a list of reference objects specify an object path to display properties of the referenced primary object.

  6. If you are defining a search results list view, then specify the name of the class that extends wcfObjectGrid as the listClass attribute of the appropriate search definition (wcfSearchDefinition). If you are defining a list view for a list of objects related to the object currently selected in the explorer view, then specify the name of the class that extends wcfChildListEditor or wcfReferenceList as the listClass attribute of the appropriate navigation list definition (wcfNavigationListDefinition).


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 the files to the production environment.


Related concepts

Management Center user interface


Related tasks

Define properties files and bundle keys for user interface text

Define icons

Define a main tool definition

Create a new tool for the Management Center

Define OpenLaszlo classes instantiated in a tool definition class

Define views for a Management Center object


+

Search Tips   |   Advanced Search