sortableColumn
目的 Purpose
Renders a sortable column to support sorting in tables.使用例 Examples
<g:sortableColumn property="title" title="Title" /><g:sortableColumn property="title" title="Title" style="width: 200px" /><g:sortableColumn property="title" titleKey="book.title" /><g:sortableColumn property="releaseDate" defaultOrder="desc" title="Release Date" /><g:sortableColumn property="releaseDate" defaultOrder="desc" title="Release Date" titleKey="book.releaseDate" />
詳細 Description
Either the title
or titleKey
attribute is required. titleKey
takes precedence when both attributes are specified resulting in the title caption being resolved against the message source. In the case when the message can not be resolved, the title is used as the title caption.属性 Attributes
property
- name of the property relating to the fielddefaultOrder
(optional) - default order for the property; choose between 'asc' (default if not provided) and 'desc'title
(optional) - title caption for the columntitleKey
(optional) - title key to use for the column, resolved against the message sourceparams
(optional) - a Map containing request parametersaction
(optional) - the name of the action to use in the link; if not specified thelist
action will be usedmapping
(optional) - The named URL mapping to use to rewrite the link