You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by tm...@apache.org on 2006/07/19 08:16:48 UTC
svn commit: r423382 -
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
Author: tmjee
Date: Tue Jul 18 23:16:47 2006
New Revision: 423382
URL: http://svn.apache.org/viewvc?rev=423382&view=rev
Log:
WW-1340
- added javadoc describing variables accessible from the decorating template (with examples)
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java?rev=423382&r1=423381&r2=423382&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java Tue Jul 18 23:16:47 2006
@@ -37,7 +37,63 @@
/**
* Applies FreeMarker-based sitemesh decorators.
- *
+ *
+ * <!-- START SNIPPET: javadoc -->
+ *
+ * The following variables are available to the decorating freemarker page :-
+ * <ul>
+ * <li>${title} - content of <title> tag in the decorated page</li>
+ * <li>${head} - content of <head> tag in the decorated page</li>
+ * <li>${body} - content of t<body> tag in the decorated page</li>
+ * <li>${page.properties} - content of the page properties</li>
+ * </ul>
+ * <p/>
+ * With the following decorated page :-
+ * <pre>
+ * <html>
+ * <meta name="author" content="tm_jee" />
+ * <head>
+ * <title>My Title</title>
+ * <link rel="stylesheet" type="text/css" href="mycss.css" />
+ * <style type="text/javascript" language="javascript" src="myjavascript.js"></script>
+ * </head>
+ * <body<
+ * <h1>Sample</h1>
+ * </body>
+ * </html>
+ * </pre>
+ * <p/>
+ * <table border="1">
+ * <tr>
+ * <td>Properties</td>
+ * <td>Content</td>
+ * </tr>
+ * <tr>
+ * <td>${title}</td>
+ * <td>My Title</td>
+ * </tr>
+ * <tr>
+ * <td>${head}</td>
+ * <td>
+ * <link rel="stylesheet" type="text/css" href="mycss.css" />
+ * <style type="text/javascript" language="javascript" src="myjavascript.js"></script>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>${body}</td>
+ * <td>
+ * <h1>Sample</h1>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td>${page.properties.meta.author}</td>
+ * <td>tm_jee</td>
+ * </tr>
+ * </table>
+ *
+ * <!-- END SNIPPET: javadoc -->
+ *
+ * @version $Date$ $Id$
*/
public class FreeMarkerPageFilter extends TemplatePageFilter {
private static final Log LOG = LogFactory.getLog(FreeMarkerPageFilter.class);