Defining 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
or listDefinitionName
attribute
of the current search definition ( lzx/commerce/foundation/restricted/SearchDefinition.lzx/wcfSearchDefinition)
to determine which list view to display in the main work area. For
search results, the list view is always an instance of wcfObjectGrid.
If
an object node is selected in the explorer view, then the framework
uses the listClass
or listDefinitionName
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 for a navigation
list definition can be either a child list editor (wcfChildListEditor ) or a reference list (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.
When you declare
a child list editor or a reference list, you must specify a value
for the listClass
or listDefinitionName
attribute.
This is a class or a definition that extends wcfObjectGrid.
About this task
Procedure
- Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
- Complete one of the following steps:
- In the Enterprise Explorer view, expand , where Management_Center_component is the name of your new custom tool.
- In the Enterprise Explorer view, expand , where Management_Center_component is the name of your new custom tool.
- Create a new list view file:
Option Description OpenLaszlo list view library file Use the following syntax to create this file: extObjectTypeGrid.lzx
.List view definition file Use the following syntax to create this file: extObjectTypeGrid.def
. - Within this new list view file:
Option Description OpenLaszlo list view library file - Define a class that extends wcfObjectGrid. If the list view is
a list of child objects or a list of reference objects, define a class
that extends wcfChildListEditor or wcfReferenceList and set the
listClass
attribute to the name of the class that extends wcfObjectGrid. - 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 lzx/commerce/foundation/restricted/GridColumn.lzx/wcfGridText to define a column that displays simple text and lzx/commerce/foundation/restricted/Checkbox.lzx/wcfGridCheckbox to define a column that displays check boxes. When defining the columns you need to 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 (lzx/commerce/foundation/restricted/ObjectDefinition.lzx/wcfReferenceObjectDefinition). When you define a column for a list of reference objects, you must specify an object path to display properties of the referenced primary object.
- If you are defining a search results list view, 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, specify the name of the class that extends wcfChildListEditor or wcfReferenceList as the listClass attribute of the appropriate navigation list definition (wcfNavigationListDefinition).
List view definition file - Create a definition that extends wcfObjectGrid. If the list view
is a list of child objects or a list of reference objects, create
a definition that extends wcfChildListEditor or wcfReferenceList and
set the
listDefinitionName
attribute to the name of the definition that extends wcfObjectGrid. - Define columns within the ObjectGrid definition. 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 check boxes. When defining the columns you need to 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, you must specify an object path to display properties of the referenced primary object.
- If you are defining a search results list view, specify the name
of the definition that extends wcfObjectGrid as the
listDefinitionName
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, specify the name of the definition that extends wcfChildListEditor or wcfReferenceList as thelistDefinitionName
attribute of the appropriate navigation list definition (wcfNavigationListDefinition).
- Define a class that extends wcfObjectGrid. If the list view is
a list of child objects or a list of reference objects, define a class
that extends wcfChildListEditor or wcfReferenceList and set the
What to do next
Version | Steps |
---|---|
|
|
|