[Struts Wiki] Update of "StrutsManualActionClasses" by MichaelJouravlev
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification. The following page has been changed by MichaelJouravlev: http://wiki.apache.org/struts/StrutsManualActionClasses -- * Update the server-side objects that will be used to create the next page of the user interface. These objects would typically be request scope or session scope beans, depending on how long you need to keep these items. * Return an appropriate !ActionForward object that identifies the next web resource. + The flip side of Struts flexibility is greater complexity of a most common use case of a web application. - The flip side of Struts flexibility is greater complexity of a most common request/response cycle comparing to similar ASP.NET request/response cycle: - - inline:asp_render_submit.gif == Action As Event Dispatcher == @@ -114, +112 @@ * handles different commands and events corresponding to a web resource (submit phase), and * selects an appropriate view based on current state of web resource (render phase). - inline:web_resource.gif + Implementing both input and output phases as well as event handlers in one Action class brings the complexity of Struts web form management down to the level of ASP.NET. - - == Action As Stateful Web Resource Manager == - - A stateful web resource stores its data in a session scope, usually in a session-scoped form bean associated with Action. This allows to use redirection without losing the data. Redirection can be used to render a view: submit action redirects to setup action instead of forwarding to it. - - If you can live with session-scoped data, your web application will sport much cleaner and user-friendly interface: - - * A web resource will have only one URL, the setup URL. Submit URL will be cleared by browser right after redirection. - * Navigating back and forward, as well as reloading a view is safe and does not cause resubmit. - * Several unsuccessful submit attempts to not accumulate in browser page history. - - inline:stateful_web_resource.gif + inline:web_resource_asp.gif == Action As Web Component Manager ==
svn commit: r417914 - /struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockServletContext.java
Author: schof Date: Wed Jun 28 18:41:11 2006 New Revision: 417914 URL: http://svn.apache.org/viewvc?rev=417914&view=rev Log: Fixes SHALE-204 Modified: struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockServletContext.java Modified: struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockServletContext.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockServletContext.java?rev=417914&r1=417913&r2=417914&view=diff == --- struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockServletContext.java (original) +++ struts/shale/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockServletContext.java Wed Jun 28 18:41:11 2006 @@ -131,6 +131,12 @@ throw new UnsupportedOperationException(); } + +public String getContextPath() { + + throw new UnsupportedOperationException(); + +} public String getInitParameter(String name) {
svn commit: r417929 - /struts/shale/trunk/shale-test/pom.xml
Author: craigmcc Date: Wed Jun 28 20:49:02 2006 New Revision: 417929 URL: http://svn.apache.org/viewvc?rev=417929&view=rev Log: It does not seem to make much practical difference, but let's be pedantic and declare that shale-test now has a compile-time dependency on JUnit (because of the use of junit.extensions.TestSetup), rather than just a test-time dependency. Modified: struts/shale/trunk/shale-test/pom.xml Modified: struts/shale/trunk/shale-test/pom.xml URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-test/pom.xml?rev=417929&r1=417928&r2=417929&view=diff == --- struts/shale/trunk/shale-test/pom.xml (original) +++ struts/shale/trunk/shale-test/pom.xml Wed Jun 28 20:49:02 2006 @@ -18,7 +18,7 @@ */ --> http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; -xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> +xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 @@ -45,6 +45,15 @@ + + + +junit +junit +3.8.1 +compile + + org.codehaus.cargo cargo-core-uberjar
svn commit: r417930 - /struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java
Author: gvanmatre Date: Wed Jun 28 20:53:31 2006 New Revision: 417930 URL: http://svn.apache.org/viewvc?rev=417930&view=rev Log: Fix for issue SHALE-203 reported by Jack Cheng. Modified: struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java Modified: struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java?rev=417930&r1=417929&r2=417930&view=diff == --- struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java (original) +++ struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java Wed Jun 28 20:53:31 2006 @@ -112,7 +112,7 @@ SymbolBean symbol = new SymbolBean(); symbol.setName(tmp.toString()); symbol.setValue(value); - clayParent.getSymbols().put(symbol.getName(), symbol.getValue()); + clayParent.getSymbols().put(symbol.getName(), symbol); return super.doStartTag();
svn commit: r417932 - in /struts/shale/trunk/maven: ./ archetypes/
Author: wsmoak Date: Wed Jun 28 21:01:45 2006 New Revision: 417932 URL: http://svn.apache.org/viewvc?rev=417932&view=rev Log: SHALE-179 Maven 2 build - Add a directory structure for the archetypes. Added: struts/shale/trunk/maven/ struts/shale/trunk/maven/archetypes/
svn commit: r417933 - in /struts/shale/trunk/shale-apps/shale-clay-usecases/src/main: resources/org/apache/shale/usecases/symbols/ webapp/WEB-INF/ webapp/rolodex/ webapp/symbols/
Author: gvanmatre Date: Wed Jun 28 21:02:10 2006 New Revision: 417933 URL: http://svn.apache.org/viewvc?rev=417933&view=rev Log: Added another flavor of the clay html template and a simple use of the clay symbol jsp tag. Added: struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/symbols/businessPerson1.html (with props) Modified: struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/resources/org/apache/shale/usecases/symbols/clay-tiles-config.xml struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/WEB-INF/faces-config.xml struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/symbols/home.html Modified: struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/resources/org/apache/shale/usecases/symbols/clay-tiles-config.xml URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/resources/org/apache/shale/usecases/symbols/clay-tiles-config.xml?rev=417933&r1=417932&r2=417933&view=diff == --- struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/resources/org/apache/shale/usecases/symbols/clay-tiles-config.xml (original) +++ struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/resources/org/apache/shale/usecases/symbols/clay-tiles-config.xml Wed Jun 28 21:02:10 2006 @@ -1,44 +1,56 @@ - http://struts.apache.org/dtds/shale-clay-config_1_0.dtd";> - - - - - http://myfaces.apache.org/images/myfaces-logo.png"/> - - - - - - - - - http://jsfcentral.com/images/jsf-logo-new.gif"/> - - - - + + + + + http://myfaces.apache.org/images/myfaces-logo.png"; /> + + + + + + + + + http://jsfcentral.com/images/jsf-logo-new.gif"; /> + + + + + + + + + + + + + Modified: struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/WEB-INF/faces-config.xml URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/WEB-INF/faces-config.xml?rev=417933&r1=417932&r2=417933&view=diff == --- struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/WEB-INF/faces-config.xml (original) +++ struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/WEB-INF/faces-config.xml Wed Jun 28 21:02:10 2006 @@ -452,6 +452,15 @@ request + + + symbols$page4 + + org.apache.shale.usecases.symbols.RegistrationForm + + request + + basicPerson @@ -538,5 +547,16 @@ + + /symbols/page4* + + save + /symbols/page4.xml + + + home + /symbols/home.html + + Modified: struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp?rev=417933&r1=417932&r2=417933&view=diff == --- struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp (original) +++ struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp Wed Jun 28 21:02:10 2006 @@ -155,8 +155,9 @@ - + + + http://svn.apache.org/viewvc/struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/symbols/businessPerson1.html?rev=417933&view=auto == --- struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/symbols/businessPerson1.html (added) +++ struts/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/symbols/businessPerson1.html Wed Jun 28 21:02:10 2006 @@ -0,0 +1,64 @@ +http://struts.apache.org/shale/clay-plugin/html";> + + + This example show
svn commit: r417935 - in /struts: sandbox/trunk/archetypes/shale-blank/ shale/trunk/maven/archetypes/shale-blank/
Author: wsmoak Date: Wed Jun 28 21:09:27 2006 New Revision: 417935 URL: http://svn.apache.org/viewvc?rev=417935&view=rev Log: SHALE-179 Maven 2 build - move the shale-blank archetype out of the sandbox. Added: struts/shale/trunk/maven/archetypes/shale-blank/ - copied from r417934, struts/sandbox/trunk/archetypes/shale-blank/ Removed: struts/sandbox/trunk/archetypes/shale-blank/
svn commit: r417936 - in /struts: sandbox/trunk/archetypes/shale-starter/ shale/trunk/maven/archetypes/shale-starter/
Author: wsmoak Date: Wed Jun 28 21:10:06 2006 New Revision: 417936 URL: http://svn.apache.org/viewvc?rev=417936&view=rev Log: SHALE-179 Maven 2 build - move the shale-starter archetype out of the sandbox. Added: struts/shale/trunk/maven/archetypes/shale-starter/ - copied from r417935, struts/sandbox/trunk/archetypes/shale-starter/ Removed: struts/sandbox/trunk/archetypes/shale-starter/
svn commit: r417951 - /struts/action2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl
Author: plightbo Date: Wed Jun 28 23:44:20 2006 New Revision: 417951 URL: http://svn.apache.org/viewvc?rev=417951&view=rev Log: @ww.xxx -> @saf.xxx Modified: struts/action2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl Modified: struts/action2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl URL: http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl?rev=417951&r1=417950&r2=417951&view=diff == --- struts/action2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl (original) +++ struts/action2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl Wed Jun 28 23:44:20 2006 @@ -4,11 +4,11 @@ -<@ww.form action="newPerson"> -<@ww.textfield label="First Name" name="person.name"/> -<@ww.textfield label="Last Name" name="person.lastName"/> -<@ww.submit value="Create person"/> - +<@saf.form action="newPerson"> +<@saf.textfield label="First Name" name="person.name"/> +<@saf.textfield label="Last Name" name="person.lastName"/> +<@saf.submit value="Create person"/> + Edit people