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/StrutsNavigationBasics

The comment on the change is:
Typos, style

------------------------------------------------------------------------------
- == Web Resources And Their Views ==
+ == Web Resources, Actions And Views ==
+ A typical web application is a collection of ''resources'' linked with each 
other. In Struts web resources are represented with one or more action classes. 
When a user requests a web resource to render itself, a corresponding action 
class selects an appropriate view and sends it to the browser. Contrary to 
page-oriented framewors like ASP.NET where a web resource equals to a web page, 
in Struts one web resource can have several corresponding web pages.
- A typical web application is a collection of ''resources'' linked with each 
other. In Struts a web resource is represented with one or more pairs of an 
action class and a form bean. When a user requests a web resource to render 
itself, a corresponding action class selects an appropriate view and sends it 
to the browser. 
- 
- Struts approach differs from page-oriented framewors like ASP.NET. In ASP.NET 
a web resource equals to web page, while in Struts one web resource can have 
several corresponding web pages.
  
  inline:basic_action_asp.gif
  
- Struts provides a clean separation between logical state of a web resource 
from its visual representation. Struts is agnostic to presentation technology, 
so a page can be displayed using JSP file, Tile definition, Velocity template, 
XSLT stylesheet or other rendering techniques.
+ Struts provides a clean separation between logical state of a web resource 
and its visual representation. Struts is agnostic to presentation technology; 
the output can be rendered using JSP file, Tile definition, Velocity template, 
XSLT stylesheet, PDF generator or other techniques.
  
  ==== Example ====
  
  Consider the Action that performs a search. The author of this code should 
not bother neither about how exactly the search criteria is obtained, nor about 
how the search results are presented. His only job is to say "what happened" 
after the search took place.
  
- There are three interesting outcomes:
+ There are three possible outcomes:
   * No results were found => outcome "none".
   * Exactly one result was found => outcome "single".
   * More than one result was found => outcome "multiple".
  
- It is up to the application architect to decide to render the same resulting 
page for all outcomes or to render different page for every outcome. The code 
of the search action is not affected by this decision.
+ It is up to the application architect to decide how to visually represent the 
search result. He can choose to render one resulting page for all outcomes, or 
to render a different page for every outcome. The code of the search action is 
not affected by this decision.
  
  == Round Trip And Postback ==
  
@@ -32, +30 @@

  
  The above interaction can be handled either with two different action classes 
or with one action class. 
  
- If two different action classes are involved, then the action class that 
renders a page is called ''render action'', while the class that processes 
submitted data is called ''submit action''. 
+ If two different action classes are involved, then the action class that 
renders a page is called a ''render action'', while the class that processes 
submitted data is called a ''submit action''. 
  
- If only one action class handles both render and submit phases, then step 4 
can also be referred to as a ''postback'', because input data is posted back to 
the same action that displayed the page.
+ If only one action class handles both render and submit phases, then step 4 
can also be referred to as a ''postback'', because input data is posted back to 
the same action that has displayed the page.
  
  Steps 4 and 5 are collectively referred to as a ''round trip''.
  
  == Navigation Between Web Resources ==
  
- In a Struts application an action class selects an appropriate view, so a 
user cannot navigate to a specific view. What a user can navigate to is a 
specific action. Control can be transferred from action to action 
programmatically as well.
+ In a Struts application a user cannot navigate to a specific view, because 
viewsa are selected by actions. Instead, a user can navigate to a specific 
action. Control can be transferred from action to action programmatically as 
well.
  
  === Navigation Via Link ===
  
@@ -48, +46 @@

  
  === Navigation Via Postback ===
  
- An action may render a page that contains an HTML form. When the form is 
submitted, the action can analyzed input data and either forward or redirect to 
another action. This way a user can be transferred to another web resource 
programmatically.
+ An action may render a page that contains an HTML form. When the form is 
submitted, the action analyzes input data and either forwards or redirects to 
another action. This way a user can be transferred to another web resource 
programmatically.
  
- Struts allows submitting an HTML form to an arbitrary action, but to keep 
things under control it is recommended to process all submits in original web 
resource's action and then transfer control to destination action instead of 
directly submitting HTML form to destination action.
+ Struts allows submitting an HTML form to an arbitrary action, but it is 
recommended to process all submits in original web resource's action to keep 
things under control. The control should be transferred from the source action 
to destination action instead of directly submitting HTML form to destination 
action.
  
  === In-Server Forwarding ===
  
+ Forwarding transfers the execution from the current action to the specified 
action on the same server. If original action has created a response stream, it 
is reused by the new action. After forwarding occurs and view is returned to 
the browser, the browser still shows the address of original action. This 
happens because the forwarding occurs on the server side and the browser 
remains unaware of it.
- Forwarding transfers the execution from the current action to the specified 
action on the same server. If original action has created a response stream, it 
is reused by the new action.
- 
- After forwarding occurs, the browser shows the address of original action 
because the forwarding occurs on the server side and the browser remains 
unaware of it.
  
  === Redirecting Via Browser ===
  

Reply via email to