loading table of contents...

7.11.3. Defining List View Columns in Search Mode

The columns in the search mode are similarly configured but instead the property searchListViewColumns is used to list all columns of the search list. CoreMedia Blueprint defines custom columns of the search mode again in the file LibraryStudioPlugin.exml:

<ui:rules>
...
  <editor:startup>
    <plugins>
      <editor:configureListViewPlugin>
        <editor:listViewDataFields>
          <datafield name="site" mapping="parent.path" convert="{getImportantPathInfo}"/>
          ...
        </editor:listViewDataFields>
        ...
        <editor:searchListViewColumns>
          <editor:listViewTypeIconColumn width="75" showTypeName="true"/>
          <editor:listViewNameColumn sortable="true"/>
          <gridcolumn id="site"
                      header="{LibraryStudioPlugin_properties.INSTANCE.ListView_column_site_header}"
                      sortable="false"
                      menuDisabled="true"
                      dataIndex="site"/>
          <editor:listViewStatusColumn width="46"/>
          <editor:listViewCreationDateColumn sortable="true" width="120"/>
          <editor:freshnessColumn  sortable="true" hidden="true"/>
        </editor:searchListViewColumns>
      </editor:configureListViewPlugin>
    </plugins>
  </editor:startup>
...
</ui:rules>

Example 7.41. Defining list view columns in the search mode


First you can see in the example above that an additional field site is defined and used for the site column.

Second the name, creation date and freshness columns are configured to be sortable so that the editor can now sort the search results by the name, creation date and freshness.

[Warning]Warning

If you define columns by your own, make sure that the freshnessColumn is configured because this column will be used as the default sort column. Otherwise the Studio user will get this error message on the console:

Invalid Saved Search Folder: Can not sort by sortfield freshness. It will be sorted by 'Last Modified' instead.

Third the freshness column is sortable but hidden. It means that the column will not be shown in the search list by default but the freshness as a sort criterion (which is the default sort criterion) will be available and shown in a drop down box for sort criteria in the search toolbar. The column can also be unhidden by the user via the grid header menu.

The listViewNameColumn, listViewCreationDateColumn and freshnessColumn columns are standard columns that can be configured to be sortable without additional configuration. To enable sorting for other columns have a look at Section 7.11.6, “Make Columns Sortable in Search and Repository View”.