struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnenn...@apache.org
Subject [05/13] struts git commit: updated javadoc
Date Wed, 03 Feb 2016 09:53:40 GMT
updated javadoc

Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/a53deac7
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/a53deac7
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/a53deac7

Branch: refs/heads/master
Commit: a53deac7ce8732053edd43dddac329448055aef0
Parents: d76357f
Author: cnenning <cnenning@apache.org>
Authored: Mon Jan 25 13:39:47 2016 +0100
Committer: cnenning <cnenning@apache.org>
Committed: Mon Jan 25 13:39:47 2016 +0100

----------------------------------------------------------------------
 .../tiles/annotation/TilesDefinition.java       | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/a53deac7/plugins/tiles/src/main/java/org/apache/struts2/tiles/annotation/TilesDefinition.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/annotation/TilesDefinition.java
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/annotation/TilesDefinition.java
index a71bbc3..1618b63 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/annotation/TilesDefinition.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/annotation/TilesDefinition.java
@@ -27,6 +27,26 @@ import java.lang.annotation.Target;
 /**
  * Represents a <code>&lt;definition&gt;</code> element in <code>tiles.xml</code>.
  *
+ * <p>
+ *  With a sample layout in <code>tiles.xml</code> like this:
+ *  <pre>
+ *      &lt;definition name="layout" template="/WEB-INF/tiles/layout.jsp"&gt;
+ *          &lt;put-attribute name="header" value=".header"/&gt;
+ *          &lt;put-attribute name="body" value=".body"/&gt;
+ *      &lt;/definition&gt;
+ *  </pre>
+ * </p>
+ * <p>
+ *  You can annotate an action like that:
+ *  <pre>
+ *      @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 {
+ *  </pre>
+ * </p>
+ *
  */
 @Retention(value = RetentionPolicy.RUNTIME)
 @Target(value = { ElementType.TYPE })


Mime
View raw message