Author: ddewolf
Date: Tue Nov 14 13:04:20 2006
New Revision: 474979
URL: http://svn.apache.org/viewvc?view=rev&rev=474979
Log:
Expanding Tiles Showcase. Adding the sitemesh decoration.
Modified:
struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml
struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/body.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/header.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/layout.jsp
Modified:
struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml?view=diff&rev=474979&r1=474978&r2=474979
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml
(original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators.xml
Tue Nov 14 13:04:20 2006
@@ -16,7 +16,6 @@
<pattern>/chat/ajax/*</pattern>
<pattern>/hangman/ajax/*</pattern>
<pattern>/nodecorate/*</pattern>
- <pattern>/tiles/*</pattern>
</excludes>
<decorator name="main" page="main.jsp">
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/body.jsp
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/body.jsp?view=diff&rev=474979&r1=474978&r2=474979
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/body.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/body.jsp Tue Nov
14 13:04:20 2006
@@ -1,3 +1,6 @@
<div>
- This content was generated by <code>/tiles/body.jsp</code>
+ <p>This example illustrates the Struts/Tiles Plugin.</p>
+
+ <p>Tiles 2 is an effort to extract the Tiles library from Struts. It is
currently housed
+ in the Sandbox area of the Apache Struts Subversion repository.</p>
</div>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/header.jsp
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/header.jsp?view=diff&rev=474979&r1=474978&r2=474979
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/header.jsp
(original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/header.jsp Tue Nov
14 13:04:20 2006
@@ -1,3 +1 @@
-<div class="header">
- This content was generated by <code>/tiles/header.jsp</code>
-</div>
\ No newline at end of file
+<h1>${title}</h1>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/layout.jsp
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/layout.jsp?view=diff&rev=474979&r1=474978&r2=474979
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/layout.jsp
(original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/layout.jsp Tue Nov
14 13:04:20 2006
@@ -1,35 +1,16 @@
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
-<html>
-<head>
- <title>Tiles Showcase</title>
- <style type="text/css">
- .header {
- background-color: #006633;
- color: white;
- }
+<%@ taglib prefix="s" uri="/struts-tags" %>
- .body {
- border: 1px solid black;
- }
- </style>
-</head>
+<%-- Show usage; Used in Header --%>
+<tiles:importAttribute name="title" scope="request"/>
+<html>
+ <head><title><tiles:getAsString name="title"/></title></head>
<body>
-<table>
- <tr>
- <td><strong>
- <tiles:getAsString name="title"/>
- </strong></td>
- </tr>
- <tr>
- <td>
- <tiles:attribute name="header"/>
- </td>
- </tr>
- <tr>
- <td>
- <tiles:attribute name="body"/>
- </td>
- </tr>
-</table>
+ <tiles:attribute name="header"/>
+
+ <p id="body">
+ <tiles:attribute name="body"/>
+ </p>
</body>
</html>
+