struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Struts Wiki] Update of "StrutsCatalogActionForms" by MichaelJouravlev
Date Mon, 01 Aug 2005 21:48:43 GMT
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/StrutsCatalogActionForms

------------------------------------------------------------------------------
- ## page was renamed from StrutsCatalogInputOutputSeparation
- The subject of this page is separation of input from output when using Struts actions. It
has two aspects: 
-    * separating input data from output data
-    * separating input phase from output phase
- 
- This page is relevant to StrutsMultipleActionForms topic, which you may want to look at
as well.
- 
- === Separating input data from output data ===
- 
- As StrutsMultipleActionForms states, "the most common use case is when we go from one page
to another page on the browser, sending the server certain request values from the first page
and getting from the server certain response values on the second page. Most pages have both
input data and output data." The reasonable choice would be to correlate each web page with
an action form. In this case "the obvious answer would be to have an Action process data from
!FirstPageActionForm and setup data for !SecondPageActionForm. This would allow us to have
a page oriented !ActionForm, which makes sense, without having to use page-centric solutions.
But, we cannot, because action mapping allows us to have only one !ActionForm per Action."
- 
  What are the possible choices for storing and accessing input and output data from an action
class?
  
  === Not using action forms ===
@@ -21, +10 @@

  
  attachment:noform.gif
  
- This approach is used by 22% of developers, who participated in the quick poll. See the
discussion in the mailing list: http://marc.theaimsgroup.com/?l=struts-user&m=111584899632546&w=2
You are welcome to vote if you have not done so: http://jmikus.freepolls.com/cgi-bin/polls/001/poll_center.htm
+ This approach is used by 22% of developers, who participated in the quick poll.
  
  === Using action form for input only ===
  
@@ -110, +99 @@

  
  Separation between input and output phases using redirection provides freedom of browsing.
Now we can reload result page without risking to resubmit input data. And we can go back and
forward again without invoking POST requests.
  
- See also: StrutsMultipleActionForms
- 
  == Comments ==
  
     * [http://www.mail-archive.com/user%40struts.apache.org/msg26454.html Thread on Struts
user list] 
@@ -121, +108 @@

  
  Please, cast your vote here: http://jmikus.freepolls.com/cgi-bin/polls/001/poll_center.htm
  
- Please note, that employing "input" property and redisplaying input page with error message
does not count as using form bean for output :)
+ Please note, that employing "input" property and redisplaying input page with error message
does not count as using form bean for output.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message