Commits

Anonymous committed 6ccc0cd

- added javadoc describing the variables available to the decorating freemarker template (with examples)

Issue number:
Obtained from:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: Issue number:
CVS: If this change addresses one or more issues,
CVS: then enter the issue number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to the project by someone else; i.e.,
CVS: they sent us a patch or a set of diffs, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2662573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits dc8965a

Comments (0)

Files changed (1)

src/java/com/opensymphony/webwork/sitemesh/FreeMarkerPageFilter.java

 
 /**
  *  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 -->
  *
  * @author patrick
+ * @author tm_jee
+ *
+ * @version $Date$ $Id$
  */
 public class FreeMarkerPageFilter extends TemplatePageFilter {
     private static final Log LOG = LogFactory.getLog(FreeMarkerPageFilter.class);