org.apache.struts2.tiles.annotation

## Annotation Type TilesDefinition

-     @Retention(value=RUNTIME)
      @Target(value=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 and Description
    --- | ---
    `String` | `extend`
    `String` | `name`
    `String` | `preparer`
    `TilesPutAttribute[]` | `putAttributes`
    `TilesPutListAttribute[]` | `putListAttributes`
    `String` | `role`
    `String` | `template`
    `String` | `templateExpression`
    `String` | `templateType`

- - ### Element Detail

    - #### extend

          public abstract String extend

      Default:
        ""

    - #### name

          public abstract String name

      Default:
        ""

    - #### preparer

          public abstract String preparer

      Default:
        ""

    - #### role

          public abstract String role

      Default:
        ""

    - #### template

          public abstract String template

      Default:
        ""

    - #### templateExpression

          public abstract String templateExpression

      Default:
        ""

    - #### templateType

          public abstract String templateType

      Default:
        ""

    - #### putAttributes

          public abstract TilesPutAttribute[] putAttributes

      Default:
        {}

    - #### putListAttributes

          public abstract TilesPutListAttribute[] putListAttributes

      Default:
        {}

Copyright © 2000–2020 Apache Software Foundation. All rights reserved.