This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/asf-staging by this push:
new 64bff49d4 Updates stage by Jenkins
64bff49d4 is described below
commit 64bff49d4f4663b2b9cbae22adcb0f2738580c47
Author: jenkins <[email protected]>
AuthorDate: Wed Oct 19 13:58:06 2022 +0000
Updates stage by Jenkins
---
content/core-developers/result-types.html | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/content/core-developers/result-types.html
b/content/core-developers/result-types.html
index 2f9dce3f4..3378c3a60 100644
--- a/content/core-developers/result-types.html
+++ b/content/core-developers/result-types.html
@@ -131,6 +131,10 @@
<a class="edit-on-gh"
href="https://github.com/apache/struts-site/edit/master/source/core-developers/result-types.md"
title="Edit this page on GitHub">Edit on GitHub</a>
<h1 class="no_toc" id="result-types">Result Types</h1>
+<p>Most use cases can be divided into two phases. First, we need to change or
query the application’s state, and then we need
+to present an updated view of the application. The Action class manages the
application’s state, and the Result Type
+manages the view.</p>
+
<ul id="markdown-toc">
<li><a href="#predefined-result-types"
id="markdown-toc-predefined-result-types">Predefined Result Types</a></li>
<li><a href="#how-to-use-results" id="markdown-toc-how-to-use-results">How
to use results</a></li>
@@ -141,10 +145,6 @@
<li><a href="#extending" id="markdown-toc-extending">Extending</a></li>
</ul>
-<p>Most use cases can be divided into two phases. First, we need to change or
query the application’s state, and then we need
-to present an updated view of the application. The Action class manages the
application’s state, and the Result Type
-manages the view.</p>
-
<h2 id="predefined-result-types">Predefined Result Types</h2>
<p>The framework provides several implementations of the <code
class="language-plaintext
highlighter-rouge">com.opensymphony.xwork2.Result</code> interface, ready to
use in your
@@ -221,7 +221,7 @@ interface. Custom Result Types might include generating an
email or JMS message,
<h2 id="how-to-use-results">How to use results</h2>
<p>Once your action has been executed it must either return a result name (as
<code class="language-plaintext highlighter-rouge">java.lang.String</code>) or
instance
-of <code class="language-plaintext
highlighter-rouge">com.opensymphony.xwork2.Result</code> and the result will be
executed directly.</p>
+of <code class="language-plaintext
highlighter-rouge">com.opensymphony.xwork2.Result</code> and then the result
will be executed directly.</p>
<p>If a String has been returned, the framework will try to find a matching
result in the configuration and then it will
execute the result of a given type, see example:</p>
@@ -229,7 +229,7 @@ execute the result of a given type, see example:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><result</span> <span
class="na">name=</span><span class="s">"success"</span> <span
class="na">type=</span><span class="s">"dispatcher"</span><span
class="nt">></span>/WEB-INF/index.jsp<span class="nt"></result></span>
</code></pre></div></div>
-<p>You can define many results per action distinguishing them by different
names.</p>
+<p>You can define many results per action distinguishing them by different
names:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><result</span> <span
class="na">name=</span><span class="s">"success"</span> <span
class="na">type=</span><span class="s">"dispatcher"</span><span
class="nt">></span>/WEB-INF/index.jsp<span class="nt"></result></span>
<span class="nt"><result</span> <span class="na">name=</span><span
class="s">"input"</span> <span class="na">type=</span><span
class="s">"dispatcher"</span><span class="nt">></span>/WEB-INF/form.jsp<span
class="nt"></result></span>
@@ -239,7 +239,7 @@ execute the result of a given type, see example:</p>
<h2 id="default-result-type">Default result type</h2>
<p>In <code class="language-plaintext
highlighter-rouge">struts-default.xml</code> the Dispatcher result type is
registered as a default result type, which means you don’t have to
-specify the <code class="language-plaintext highlighter-rouge">type</code>
attribute if yoy want to use it:</p>
+specify the <code class="language-plaintext highlighter-rouge">type</code>
attribute if you want to use it:</p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><result</span> <span
class="na">name=</span><span class="s">"success"</span><span
class="nt">></span>/WEB-INF/index.jsp<span class="nt"></result></span>
</code></pre></div></div>
@@ -284,7 +284,7 @@ Check <a href="object-factory">Define dedicated factory</a>
to see how to do it.
<p>Struts 2 provides one such extension for you:</p>
<p><code class="language-plaintext
highlighter-rouge">ParamNameAwareResult</code> interface when used with <code
class="language-plaintext highlighter-rouge">StrutsResultBuilder</code> can
limit parameters assigned to the result.
-So you can simple extend existing result with such a functionality as
below:</p>
+So you can simply extend existing result with such a functionality as
below:</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">MyResult</span> <span
class="kd">extends</span> <span class="nc">ServletDispatcherResult</span> <span
class="kd">implements</span> <span class="nc">ParamNameAwareResult</span> <span
class="o">{</span>