"Fossies" - the Fresh Open Source Software Archive

Member "grails-core-5.2.4/grails-docs/src/test/resources/docs/ref/Tags/sortableColumn.html" (14 Sep 2022, 62588 Bytes) of package /linux/www/grails-core-5.2.4.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the grails-core-5.2.4.tar.gz project site itself.

(Quick Reference)

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 field

  • defaultOrder (optional) - default order for the property; choose between 'asc' (default if not provided) and 'desc'

  • title (optional) - title caption for the column

  • titleKey (optional) - title key to use for the column, resolved against the message source

  • params (optional) - a Map containing request parameters

  • action (optional) - the name of the action to use in the link; if not specified the list action will be used

  • mapping (optional) - The named URL mapping to use to rewrite the link