struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r423382 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitemesh/FreeMarkerPageFilter.java
Date Wed, 19 Jul 2006 06:16:48 GMT
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 &lt;title&gt; tag in the decorated
page</li>
+ *      <li>${head}            - content of &lt;head&gt; tag in the decorated
page</li>
+ *      <li>${body}            - content of t&lt;body&gt; tag in the decorated
page</li>
+ *      <li>${page.properties} - content of the page properties</li>
+ *  </ul>
+ *  <p/>
+ *  With the following decorated page :-
+ *  <pre>
+ *  &lt;html&gt;
+ *      &lt;meta name="author" content="tm_jee" /&gt;
+ *      &lt;head&gt;
+ *          &lt;title&gt;My Title&lt;/title&gt;
+ *          &lt;link rel="stylesheet" type="text/css" href="mycss.css" /&gt;
+ *          &lt;style type="text/javascript" language="javascript" src="myjavascript.js"&gt;&lt;/script&gt;
+ *      &lt;/head&gt;
+ *      &lt;body&lt;
+ *          &lt;h1&gt;Sample&lt;/h1&gt;
+ *      &lt;/body&gt;
+ *  &lt;/html&gt;
+ *  </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>
+ *              &lt;link rel="stylesheet" type="text/css" href="mycss.css" /&gt;
+ *              &lt;style type="text/javascript" language="javascript" src="myjavascript.js"&gt;&lt;/script&gt;
+ *          </td>
+ *      </tr>
+ *      <tr>
+ *          <td>${body}</td>
+ *          <td>
+ *              &lt;h1&gt;Sample&lt;/h1&gt;
+ *          </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);



Mime
View raw message