- added a freemarker manager example into show case

git-svn-id: https://svn.apache.org/repos/asf/struts/action2/trunk@412775 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Toby Jee
2006-06-08 15:30:23 +00:00
parent 95eef80a38
commit e29cec941f
2 changed files with 46 additions and 0 deletions
@@ -0,0 +1,26 @@
<html>
<head>
<title>Showcase - Freemarker - CustomFreemarkerManager Usage</title>
</head>
<body>
<h1>Custom Freemarker Manager Usage</h1>
<p/>
This page shows a simple example of using a custom freemarker manager.
The custom freemarker manager put into freemarker model an util classed
under the name 'customFreemarkerManagerUtil'. so one could use
<p/>
<ul>
<li>$ { customFreemarkerManagerUtil.getTodayDate() } - to get today's date</li>
<li>$ { customFreemarkerManagerUtil.todayDate } - to get today's date</li>
<li>$ { customFreemarkerManagerUtil.getTimeNow() } - to get the time now</li>
<li>$ { customFreemarkerManagerUtil.timeNow } - to get the time now</li>
</ul>
Today's Date = ${customFreemarkerManagerUtil.todayDate}<br/>
Time now = ${customFreemarkerManagerUtil.getTimeNow()}<br/>
</body>
</html>
@@ -0,0 +1,20 @@
<%@taglib prefix="saf" uri="/struts-action" %>
<html>
<head>
<title>Showcase - Freemarker</title>
</head>
<body>
<ul>
<li>
<saf:url id="url" action="customFreemarkerManagerDemo" namespace="/freemarker" />
<saf:a href="%{#url}">Demo of usage of a Custom Freemarker Manager</saf:a>
</li>
</ul>
</body>
</html>