@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface TilesDefinition
<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 {
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 |
public abstract String extend
public abstract String name
public abstract String preparer
public abstract String role
public abstract String template
public abstract String templateExpression
public abstract String templateType
public abstract TilesPutAttribute[] putAttributes
public abstract TilesPutListAttribute[] putListAttributes
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.