Package org.apache.struts2.tiles.annotation

# Annotation Interface TilesDefinition

@Retention(RUNTIME) @Target(TYPE) @Inherited public @interface TilesDefinition
Represents a `<definition>` element in `tiles.xml`.

With a sample layout in `tiles.xml` like this:

          <definition name="layout" template="/WEB-INF/tiles/layout.jsp">
              <put-attribute name="header" value=".header"/>
              <put-attribute name="body" value=".body"/>
          </definition>

You can annotate an action like that:

          @Result(name = "success", type="tiles")
          @TilesDefinition(extend = "layout", putAttributes = {
              @TilesPutAttribute(name = "header", value = "/WEB-INF/tiles/header.jsp"),
              @TilesPutAttribute(name = "body", value = "/WEB-INF/tiles/body.ftl")
          })
          public class FooAction extends ActionSupport {

- ## Optional Element Summary

  Optional Elements
  Modifier and Type
  Optional Element
  Description
  `String`
  `extend`
  `String`
  `name`
  `String`
  `preparer`
  `TilesPutAttribute[]`
  `putAttributes`
  `TilesPutListAttribute[]`
  `putListAttributes`
  `String`
  `role`
  `String`
  `template`
  `String`
  `templateExpression`
  `String`
  `templateType`

- ## Element Details

  - ### extend

    String extend
    Default:
      ""

  - ### name

    String name
    Default:
      ""

  - ### preparer

    String preparer
    Default:
      ""

  - ### role

    String role
    Default:
      ""

  - ### template

    String template
    Default:
      ""

  - ### templateExpression

    String templateExpression
    Default:
      ""

  - ### templateType

    String templateType
    Default:
      ""

  - ### putAttributes

    TilesPutAttribute[] putAttributes
    Default:
      {}

  - ### putListAttributes

    TilesPutListAttribute[] putListAttributes
    Default:
      {}