Author: nilsga Date: Fri Aug 24 03:30:27 2007 New Revision: 569333 URL: http://svn.apache.org/viewvc?rev=569333&view=rev Log: WW-2105 Added redirectAction-example
Added: struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputPrg.jsp Modified: struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExample.java struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/index.jsp Modified: struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExample.java URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExample.java?rev=569333&r1=569332&r2=569333&view=diff ============================================================================== --- struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExample.java (original) +++ struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExample.java Fri Aug 24 03:30:27 2007 @@ -44,4 +44,7 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String displayResult() { + return "displayResult"; + } } Added: struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputPrg.jsp URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputPrg.jsp?rev=569333&view=auto ============================================================================== --- struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputPrg.jsp (added) +++ struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputPrg.jsp Fri Aug 24 03:30:27 2007 @@ -0,0 +1,8 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> + +<H2>Input your name</H2> +<s:form action="formExamplePrg" method="POST"> + <s:textfield label="First name" name="firstName" value="%{firstName}"/> + <s:textfield label="Last name" name="lastName" value="%{lastName}"/> + <s:submit value="Submit the form"/> +</s:form> Modified: struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/index.jsp URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/index.jsp?rev=569333&r1=569332&r2=569333&view=diff ============================================================================== --- struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/index.jsp (original) +++ struts/struts2/branches/STRUTS_2_0_X/apps/portlet/src/main/webapp/WEB-INF/view/index.jsp Fri Aug 24 03:30:27 2007 @@ -4,6 +4,7 @@ Here you'll find examples of what is possible with the Struts Portlet integration framework. <ul> <li><a href="<s:url action="formExample"/>">A simple form</a></li> +<li><a href="<s:url action="formExamplePrg" method="input"/>">Form example with proper PRG</a></li> <li><a href="<s:url action="formExampleModelDriven" method="input"/>">Model driven example</li> <li><a href="<s:url action="validationExample"/>">Validation</a></li> <li><a href="<s:url action="tokenExample"/>">Token</a></li>