Package: org.codehaus.groovy.grails.plugins.web.taglib

## [Groovy] Class UrlMappingTagLib

- org.codehaus.groovy.grails.plugins.web.taglib.UrlMappingTagLib

- Tag library with tags that integration with the URL mappings API (paginate, include etc.)

  Authors:
    Graeme Rocher
  Since:
    2.4

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `CodecLookup` | `codecLookup`
    `TagLibraryLookup` | `gspTagLibraryLookup`
    `groovy.lang.Closure` | `include` Includes another controller/action within the current response.
    `groovy.lang.Closure` | `paginate` Creates next/previous links to support pagination for the current controller.
    `groovy.lang.Closure` | `sortableColumn` Renders a sortable column to support sorting in list views.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Property Detail

    - #### CodecLookup codecLookup

    - #### TagLibraryLookup gspTagLibraryLookup

    - #### groovy.lang.Closure include

      Includes another controller/action within the current response.
      <g:include controller="foo" action="test"></g:include>

      emptyTag:
        @attr controller The name of the controller
      attr:
        action The name of the action
      attr:
        id The identifier
      attr:
        params Any parameters
      attr:
        view The name of the view. Cannot be specified in combination with controller/action/id
      attr:
        model A model to pass onto the included controller in the request

    - #### groovy.lang.Closure paginate

      Creates next/previous links to support pagination for the current controller.
      <g:paginate total="${Account.count()}" />

      emptyTag:
        @attr total REQUIRED The total number of results to paginate
      attr:
        action the name of the action to use in the link, if not specified the default action will be linked
      attr:
        controller the name of the controller to use in the link, if not specified the current controller will be linked
      attr:
        id The id to use in the link
      attr:
        params A map containing request parameters
      attr:
        prev The text to display for the previous link (defaults to "Previous" as defined by default.paginate.prev property in I18n messages.properties)
      attr:
        next The text to display for the next link (defaults to "Next" as defined by default.paginate.next property in I18n messages.properties)
      attr:
        omitPrev Whether to not show the previous link (if set to true, the previous link will not be shown)
      attr:
        omitNext Whether to not show the next link (if set to true, the next link will not be shown)
      attr:
        omitFirst Whether to not show the first link (if set to true, the first link will not be shown)
      attr:
        omitLast Whether to not show the last link (if set to true, the last link will not be shown)
      attr:
        max The number of records displayed per page (defaults to 10). Used ONLY if params.max is empty
      attr:
        maxsteps The number of steps displayed for pagination (defaults to 10). Used ONLY if params.maxsteps is empty
      attr:
        offset Used only if params.offset is empty
      attr:
        mapping The named URL mapping to use to rewrite the link
      attr:
        fragment The link fragment (often called anchor tag) to use

    - #### groovy.lang.Closure sortableColumn

      Renders a sortable column to support sorting in list views.
      Attribute title or titleKey is required. When both attributes are specified then titleKey takes precedence, resulting in the title caption to be resolved against the message source. In case when the message could not be resolved, the title will be used as title caption.
      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" />

      emptyTag:
        @attr property - name of the property relating to the field
      attr:
        defaultOrder default order for the property; choose between asc (default if not provided) and desc
      attr:
        title title caption for the column
      attr:
        titleKey title key to use for the column, resolved against the message source
      attr:
        params a map containing request parameters
      attr:
        action the name of the action to use in the link, if not specified the list action will be linked
      attr:
        params A map containing URL query parameters
      attr:
        class CSS class name