If you need additional fields in the underlying store, you can add fields using the
listViewDataFields
property of the configureListViewPlugin
. The
standard columns do not need an explicit field configuration. But if, for example, you may
want to display the name of the user who created a content, the implementation would look like
this:
<editor:configureListViewPlugin> <editor:listViewDataFields> ... <datafield name="creator" mapping="creator.name"/> </editor:listViewDataFields> <editor:repositoryListViewColumns> ... <gridcolumn id="creator" header="Creator" sortable="false" dataIndex="creator"/> </editor:repositoryListViewColumns> </editor:configureListViewPlugin>
Example 7.40. Defining list view fields
In this case, an Ext JS gridcolumn
is used for display, setting the column's
attributes as needed. The definition of the field is slightly complex, because the property
name
of the property creator
of each content in the search result
should be accessed. To this end, a non-trivial mapping
property will be added,
but the name
attribute of the data field and the dataIndex
attribute
of the column will be kept simple and in sync. If the mapping property were identical to the
name property of the field, it could have been omitted.