The list view of the library window is implemented using an Ext JS grid panel. A grid panel aggregates columns that refer to fields of an underlying store. For adding a new column, you usually have to add both a column definition and a field definition.
Although the editor context in the form of the interface IEditorContext
allows a
direct configuration in the form of the methods addListViewDataField
and
setRepositoryListViewColumns
, the recommended way of defining columns uses the
configureListViewPlugin
in an EXML file containing Studio plugin.
CoreMedia Blueprint defines custom columns of the repository mode
in the file LibraryStudioPlugin.exml
:
<ui:rules> ... <editor:startup> <plugins> <editor:configureListViewPlugin> ... <editor:repositoryListViewColumns> <editor:listViewTypeIconColumn width="75" showTypeName="true"/> <editor:listViewNameColumn sortable="true"/> <editor:listViewStatusColumn width="46"/> <editor:listViewCreationDateColumn width="120" sortable="true"/> <editor:freshnessColumn sortable="true" hidden="true"/> </editor:repositoryListViewColumns> ... </editor:configureListViewPlugin> </plugins> </editor:startup> ... </ui:rules>
Example 7.39. Defining list view columns in the repository mode
The property repositoryListViewColumns
lists all
columns that should be displayed (not just the ones you want to add to the default) in the
repository mode. Some columns in this example use predefined components from the Editor SDK,
whereas some special columns use just a configured Ext JS standard grid column.
The listViewTypeColumn
, listViewNameColumn
,
listViewCreationDateColumn
, and freshnessColumn
columns represent
the standard columns that would be present without additional configuration (id and width of
the column has to be defined if necessary), displaying a document's type, name, date of
creation, and modification date, respectively. The listViewStatusColumn
component
represents an additional column that displays a document's lifecycle status (in production,
approved, ...) and checked-out state. These columns can be made sortable by setting the
attribute sortable
to true
. To enable sorting for other columns have
a look at Section 7.11.6, “Make Columns Sortable in Search and Repository View”.