mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
- 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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user