Author: tmjee
Date: Sun Jun 18 04:07:09 2006
New Revision: 415119
URL: http://svn.apache.org/viewvc?rev=415119&view=rev
Log:
WW-1352
- added an example into showcase demonstrating the usage of action
prefix
Added:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/index.jsp
(with props)
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl
Added:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl
URL:
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl?rev=415119&view=auto
==============================================================================
---
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl
(added)
+++
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl
Sun Jun 18 04:07:09 2006
@@ -0,0 +1,19 @@
+
+
+<html>
+<head>
+ <title>Showcase - Tags - Non UI - Action Prefix (freemarker)</title>
+</head>
+<body>
+
+ You have come to this page because you used an 'action' prefix.<p/>
+
+ The text you've enter is ${text?default('')}<p/>
+
+ <@saf.url id="url" action="actionPrefixExampleUsingFreemarker"
namespace="/tags/non-ui/actionPrefix" />
+ <@saf.a href="%{#url}">Back</@saf.a>
+
+</body>
+</html>
+
+
Added:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl
URL:
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl?rev=415119&view=auto
==============================================================================
---
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl
(added)
+++
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl
Sun Jun 18 04:07:09 2006
@@ -0,0 +1,45 @@
+
+<html>
+ <head>
+ <title>Showcase - Tags - Non UI - Action Prefix
(Freemarker)</title>
+ </head>
+ <body>
+ <b>Action Prefix</b><br/>
+ By clicking on 'action prefix' button, the request will go to
the action alias 'actionPrefix'
+ instead of the normal 'submit' action alias. <p/><p/>
+
+ <b>Method Prefix</b><br/>
+ By clicking on the 'method prefix' button, the request will
cuase SAF to invoke 'submit'
+ action alias's 'alternateMethod' method instead of the default
'execute' method.<p/>
+
+ <b>Redirect Prefix</b><br/>
+ By clicking on the 'redirect prefix' button, the request will
get redirected to www.google.com
+ instead<p/>
+
+ <b>Redirect Action Prefix</b><br/>
+ By clicking on the 'redirect-action prefix' button, the request
will get redirected to
+ an action alias of 'redirectActionPrefix' instead of 'submit'
action alias. Since this is a
+ redirect (a new request is issue from the client), the text
entered will be lost.<p/>
+
+
+ <@saf.url id="url" action="viewSource"
namespace="/tags/non-ui/actionPrefix" />
+ The JSP code can be read <@saf.a href="%{#url}">here</@saf.a>.
+
+
+ <@saf.form action="submit"
namespace="/tags/non-ui/actionPrefix" method="POST">
+
+ <@saf.textfield label="Enter Some Text" name="text" />
+
+ <@saf.submit name="action:actionPrefix"
value="%{'action prefix'}" />
+
+ <@saf.submit name="method:alternateMethod"
value="%{'method prefix'}" />
+
+ <@saf.submit name="redirect:http://www.google.com"
value="%{'redirect prefix'}" />
+
+ <@saf.submit
name="redirect-action:redirectActionPrefix" value="%{'redirect-action prefix'}"
/>
+
+ <@saf.submit value="Normal Submit" />
+ </@saf.form>
+ </body>
+</html>
+
Added:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/index.jsp
URL:
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/index.jsp?rev=415119&view=auto
==============================================================================
---
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/index.jsp
(added)
+++
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/index.jsp
Sun Jun 18 04:07:09 2006
@@ -0,0 +1,13 @@
+
+<[EMAIL PROTECTED] prefix="saf" uri="/struts-action" %>
+
+<html>
+<head>
+<title>Showcase - Tags - Non-Ui - Action Prefix</title>
+</head>
+<body>
+ <ul><saf:url id="url" action="actionPrefixExampleUsingFreemarker"
namespace="/tags/non-ui/actionPrefix" />
+ <saf:a href="%{#url}">Action Prefix Example (Freemarker)</saf:a></ul>
+</body>
+</html>
+
Propchange:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl
URL:
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl?rev=415119&view=auto
==============================================================================
---
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl
(added)
+++
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl
Sun Jun 18 04:07:09 2006
@@ -0,0 +1,19 @@
+
+
+<html>
+<head>
+ <title>Showcase - Tags - Non UI - Action Prefix (freemarker)</title>
+</head>
+<body>
+
+ You have come to this page because you used an 'method' prefix.<p/>
+
+ The text you've enter is ${text?default('')}<p/>
+
+ <@saf.url id="url" action="actionPrefixExampleUsingFreemarker"
namespace="/tags/non-ui/actionPrefix" />
+ <@saf.a href="%{#url}">Back</@saf.a>
+
+</body>
+</html>
+
+
Added:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl
URL:
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl?rev=415119&view=auto
==============================================================================
---
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl
(added)
+++
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl
Sun Jun 18 04:07:09 2006
@@ -0,0 +1,17 @@
+
+<html>
+<head>
+ <title>Showcase - Tags - Non UI - Action Prefix (freemarker)</title>
+</head>
+<body>
+
+ You have come to this page because you did a normal submit.<p/>
+
+ The text you've enter is %{text}<p/>
+
+ <@saf.url id="url" action="actionPrefixExampleUsingFreemarker"
namespace="/tags/non-ui/prefix" />
+ <@saf.a href="%{#url}">Back</@saf.a>
+
+</body>
+</html>
+
Added:
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl
URL:
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl?rev=415119&view=auto
==============================================================================
---
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl
(added)
+++
struts/action2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl
Sun Jun 18 04:07:09 2006
@@ -0,0 +1,22 @@
+
+
+<html>
+<head>
+ <title>Showcase - Tags - Non UI - Action Prefix (freemarker)</title>
+</head>
+<body>
+
+ You have come to this page because you used an 'redirect-action'
prefix.<p/>
+
+ Because this is a 'redirect-action', the text will be lost, due to a
redirection
+ implies a new request being issued from the client.<p/>
+
+ The text you've enter is ${text?default('')}<p/>
+
+ <@saf.url id="url" action="actionPrefixExampleUsingFreemarker"
namespace="/tags/non-ui/actionPrefix" />
+ <@saf.a href="%{#url}">Back</@saf.a>
+
+</body>
+</html>
+
+