You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2014/11/03 08:53:18 UTC
svn commit: r1636285 [3/3] - in /wicket/common/site/trunk/_site/guide/guide:
./ pages/ src/docs/guide/requestProcessing/
Modified: wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_3.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_3.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_3.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_3.html Mon Nov 3 07:53:10 2014
@@ -215,7 +215,7 @@ Page '<page class>' is not state
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_4.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_4.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_4.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_4.html Mon Nov 3 07:53:10 2014
@@ -192,7 +192,7 @@ function addJsClass() {
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_1.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_1.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_1.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_1.html Mon Nov 3 07:53:10 2014
@@ -193,7 +193,7 @@ However, none of these frameworks offers
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_2.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_2.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_2.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_2.html Mon Nov 3 07:53:10 2014
@@ -199,7 +199,7 @@ This approach is very similar to what GU
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_3.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_3.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_3.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_3.html Mon Nov 3 07:53:10 2014
@@ -198,7 +198,7 @@ Let's quickly review the main advantages
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_4.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_4.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_4.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/whyLearn_4.html Mon Nov 3 07:53:10 2014
@@ -199,7 +199,7 @@ Wicket is not the only component oriente
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_1.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_1.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_1.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_1.html Mon Nov 3 07:53:10 2014
@@ -197,7 +197,7 @@ Every WicketStuff module can be download
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_2.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_2.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_2.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_2.html Mon Nov 3 07:53:10 2014
@@ -216,7 +216,7 @@ textArea.add(<span class="java-keywo
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_3.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_3.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_3.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_3.html Mon Nov 3 07:53:10 2014
@@ -207,7 +207,7 @@ function addJsClass() {
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_4.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_4.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_4.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_4.html Mon Nov 3 07:53:10 2014
@@ -201,7 +201,7 @@ add(<span class="java-keyword">new</
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_5.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_5.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_5.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_5.html Mon Nov 3 07:53:10 2014
@@ -200,7 +200,7 @@ add(grid);</pre></div><p class="paragrap
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_6.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_6.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_6.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/pages/wicketstuff_6.html Mon Nov 3 07:53:10 2014
@@ -216,7 +216,7 @@ To write/read objects to response/from r
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/redirects.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/redirects.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/redirects.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/redirects.html Mon Nov 3 07:53:10 2014
@@ -227,7 +227,7 @@ Quite a few teams have already got stuck
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/repeaters.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/repeaters.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/repeaters.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/repeaters.html Mon Nov 3 07:53:10 2014
@@ -352,7 +352,7 @@ Wicket provides also component PageableL
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/requestProcessing.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/requestProcessing.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/requestProcessing.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/requestProcessing.html Mon Nov 3 07:53:10 2014
@@ -174,7 +174,10 @@ function addJsClass() {
<div class="toc-item" style="margin-left:0px"><a href="#requestProcessing_4"><strong>9.4</strong><span>Session Class</span></a>
</div>
- <div class="toc-item" style="margin-left:0px"><a href="#requestProcessing_5"><strong>9.5</strong><span>Summary</span></a>
+ <div class="toc-item" style="margin-left:0px"><a href="#requestProcessing_5"><strong>9.5</strong><span>Exception handling</span></a>
+ </div>
+
+ <div class="toc-item" style="margin-left:0px"><a href="#requestProcessing_6"><strong>9.6</strong><span>Summary</span></a>
</div>
</div>
@@ -282,7 +285,23 @@ Remember that invalidateNow() will immed
-<h2 id="requestProcessing_5">9.5 Summary</h2>
+<h2 id="requestProcessing_5">9.5 Exception handling</h2>
+Wicket uses a number of custom exceptions during the regular running of an application. We have already seen <code>PageExpiredException</code> raised when a page version is expired. Other examples of such exceptions are <code>AuthorizationException</code> and <code>RestartResponseException</code>. We will see them later in the next chapters.
+All the other exceptions raised during rendering phase are handled by an implementation of <code>org.apache.wicket.request.IExceptionMapper</code> which by default is class <code>org.apache.wicket.DefaultExceptionMapper</code>. If we are working in DEVELOPMENT mode this mapper will redirect us to a page that shows the exception stacktrace (page <code>ExceptionErrorPage</code>). On the contrary, if application is running in DEPLOYMENT mode <code>DefaultExceptionMapper</code> will display an internal error page which by default is <code>org.apache.wicket.markup.html.pages.InternalErrorPage</code>.
+To use a custom internal error page we can change application settings like this:<p class="paragraph"/><div class="code"><pre>getApplicationSettings().setInternalErrorPage(MyInternalErrorPage.class);</pre></div><p class="paragraph"/>We can also manually set if Wicket should display the exception with <code>ExceptionErrorPage</code> or if we want to use the internal error page or if we don't want to display anything at all when an unexpected exception is thrown:<p class="paragraph"/><div class="code"><pre>//show <span class="java-keyword">default</span> developer page
+getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_EXCEPTION_PAGE);
+//show internal error page
+getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
+//show no exception page when an unexpected exception is thrown
+getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_NO_EXCEPTION_PAGE);</pre></div><p class="paragraph"/>Developers can also decide to use a custom exception mapper instead of <code>DefaultExceptionMapper</code>. To do this we must override <code>Application</code>'s method <code>getExceptionMapperProvider</code>:<p class="paragraph"/><div class="code"><pre>@Override
+<span class="java-keyword">public</span> IProvider<IExceptionMapper> getExceptionMapperProvider()
+{
+ //…
+}</pre></div><p class="paragraph"/>The method returns an instance of <code>org.apache.wicket.util.IProvider</code> that should return our custom exception mapper.<p class="paragraph"/><h3>Ajax requests</h3><p class="paragraph"/>To control the behavior in Ajax requests the application may use <code>org.apache.wicket.settings.IExceptionSettings#setAjaxErrorHandlingStrategy(IExceptionSettings.AjaxErrorStrategy)</code>. By default if an error occurs during the
+processing of an Ajax request Wicket will render the configured error page. By configuring <code>org.apache.wicket.settings.IExceptionSettings.AjaxErrorStrategy#INVOKE_FAILURE_HANDLER</code> as the default strategy the application will call the JavaScript <code>onFailure</code> callback(s) instead.
+
+
+<h2 id="requestProcessing_6">9.6 Summary</h2>
<p class="paragraph"/>In this chapter we had a look at how Wicket internally handles a web request. Even if most of the time we won't need to customize this internal process, knowing how it works is essential to use the framework at 100%.<p class="paragraph"/>Entities like Application and Session will come in handy again when we will tackle the topic of security in chapter 20.
@@ -312,7 +331,7 @@ Remember that invalidateNow() will immed
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/resources.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/resources.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/resources.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/resources.html Mon Nov 3 07:53:10 2014
@@ -456,7 +456,7 @@ In this chapter we have learnt how to ma
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/security.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/security.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/security.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/security.html Mon Nov 3 07:53:10 2014
@@ -461,7 +461,7 @@ Application class <code>AuthenticatedWeb
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/single.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/single.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/single.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/single.html Mon Nov 3 07:53:10 2014
@@ -216,7 +216,9 @@ function addJsClass(el) {
<div class="toc-item" style="margin-left:10px"><a href="#requestProcessing_4"><strong>9.4</strong><span>Session Class</span></a></div>
- <div class="toc-item" style="margin-left:10px"><a href="#requestProcessing_5"><strong>9.5</strong><span>Summary</span></a></div>
+ <div class="toc-item" style="margin-left:10px"><a href="#requestProcessing_5"><strong>9.5</strong><span>Exception handling</span></a></div>
+
+ <div class="toc-item" style="margin-left:10px"><a href="#requestProcessing_6"><strong>9.6</strong><span>Summary</span></a></div>
<div class="toc-item" style="margin-left:0px"><a href="#urls"><strong>10</strong><span>Wicket Links and URL generation</span></a></div>
@@ -1131,7 +1133,9 @@ If we forget to call superclass version
<h2 id="componentLifecycle_5">7.5 Removing stage</h2>
-<p class="paragraph"/>This stage is triggered when a component is removed from its component hierarchy. The only hook method for this phase is <code>onRemove()</code>. If our component still holds some resources needed during rendering phase, we can override this method to release them.<p class="paragraph"/>Once a component has been removed we are free to add it again to the same container or to a different one.
+<p class="paragraph"/>This stage is triggered when a component is removed from its container hierarchy. The only hook method for this phase is <code>onRemove()</code>. If our component still holds some resources needed during rendering phase, we can override this method to release them.<p class="paragraph"/>Once a component has been removed we are free to add it again to the same container or to a different one. Starting from version 6.18.0 Wicket added a further hook method called <code>onReAdd()</code> which is triggered every time a previously removed component is re-added to a cointainer.
+Please note that while <code>onInitialize</code> is called only the very first time a component is added, <code>onReAdd</code> is called every time it is re-added after having been removed.
+
<h2 id="componentLifecycle_6">7.6 Summary</h2>
@@ -1327,7 +1331,23 @@ Remember that invalidateNow() will immed
-<h2 id="requestProcessing_5">9.5 Summary</h2>
+<h2 id="requestProcessing_5">9.5 Exception handling</h2>
+Wicket uses a number of custom exceptions during the regular running of an application. We have already seen <code>PageExpiredException</code> raised when a page version is expired. Other examples of such exceptions are <code>AuthorizationException</code> and <code>RestartResponseException</code>. We will see them later in the next chapters.
+All the other exceptions raised during rendering phase are handled by an implementation of <code>org.apache.wicket.request.IExceptionMapper</code> which by default is class <code>org.apache.wicket.DefaultExceptionMapper</code>. If we are working in DEVELOPMENT mode this mapper will redirect us to a page that shows the exception stacktrace (page <code>ExceptionErrorPage</code>). On the contrary, if application is running in DEPLOYMENT mode <code>DefaultExceptionMapper</code> will display an internal error page which by default is <code>org.apache.wicket.markup.html.pages.InternalErrorPage</code>.
+To use a custom internal error page we can change application settings like this:<p class="paragraph"/><div class="code"><pre>getApplicationSettings().setInternalErrorPage(MyInternalErrorPage.class);</pre></div><p class="paragraph"/>We can also manually set if Wicket should display the exception with <code>ExceptionErrorPage</code> or if we want to use the internal error page or if we don't want to display anything at all when an unexpected exception is thrown:<p class="paragraph"/><div class="code"><pre>//show <span class="java-keyword">default</span> developer page
+getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_EXCEPTION_PAGE);
+//show internal error page
+getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
+//show no exception page when an unexpected exception is thrown
+getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_NO_EXCEPTION_PAGE);</pre></div><p class="paragraph"/>Developers can also decide to use a custom exception mapper instead of <code>DefaultExceptionMapper</code>. To do this we must override <code>Application</code>'s method <code>getExceptionMapperProvider</code>:<p class="paragraph"/><div class="code"><pre>@Override
+<span class="java-keyword">public</span> IProvider<IExceptionMapper> getExceptionMapperProvider()
+{
+ //…
+}</pre></div><p class="paragraph"/>The method returns an instance of <code>org.apache.wicket.util.IProvider</code> that should return our custom exception mapper.<p class="paragraph"/><h3>Ajax requests</h3><p class="paragraph"/>To control the behavior in Ajax requests the application may use <code>org.apache.wicket.settings.IExceptionSettings#setAjaxErrorHandlingStrategy(IExceptionSettings.AjaxErrorStrategy)</code>. By default if an error occurs during the
+processing of an Ajax request Wicket will render the configured error page. By configuring <code>org.apache.wicket.settings.IExceptionSettings.AjaxErrorStrategy#INVOKE_FAILURE_HANDLER</code> as the default strategy the application will call the JavaScript <code>onFailure</code> callback(s) instead.
+
+
+<h2 id="requestProcessing_6">9.6 Summary</h2>
<p class="paragraph"/>In this chapter we had a look at how Wicket internally handles a web request. Even if most of the time we won't need to customize this internal process, knowing how it works is essential to use the framework at 100%.<p class="paragraph"/>Entities like Application and Session will come in handy again when we will tackle the topic of security in chapter 20.
@@ -4767,7 +4787,7 @@ and attach it to a ticket in Apache Wick
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/src/docs/guide/requestProcessing/requestProcessing_5.gdoc
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/src/docs/guide/requestProcessing/requestProcessing_5.gdoc?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/src/docs/guide/requestProcessing/requestProcessing_5.gdoc (original)
+++ wicket/common/site/trunk/_site/guide/guide/src/docs/guide/requestProcessing/requestProcessing_5.gdoc Mon Nov 3 07:53:10 2014
@@ -1,5 +1,5 @@
Wicket uses a number of custom exceptions during the regular running of an application. We have already seen @PageExpiredException@ raised when a page version is expired. Other examples of such exceptions are @AuthorizationException@ and @RestartResponseException@. We will see them later in the next chapters.
-All the other exceptions raised during rendering phase are handled by an implementation of @org.apache.wicket.request.IExceptionMapper@ which by default is class @org.wicket.DefaultExceptionMapper@. If we are working in DEVELOPMENT mode this mapper will redirect us to a page that shows the exception stacktrace (page @ExceptionErrorPage@). On the contrary, if application is running in DEPLOYMENT mode @DefaultExceptionMapper@ will display an internal error page which by default is @InternalErrorPage@.
+All the other exceptions raised during rendering phase are handled by an implementation of @org.apache.wicket.request.IExceptionMapper@ which by default is class @org.apache.wicket.DefaultExceptionMapper@. If we are working in DEVELOPMENT mode this mapper will redirect us to a page that shows the exception stacktrace (page @ExceptionErrorPage@). On the contrary, if application is running in DEPLOYMENT mode @DefaultExceptionMapper@ will display an internal error page which by default is @org.apache.wicket.markup.html.pages.InternalErrorPage@.
To use a custom internal error page we can change application settings like this:
{code}
@@ -28,3 +28,8 @@ public IProvider<IExceptionMapper> getEx
{code}
The method returns an instance of @org.apache.wicket.util.IProvider@ that should return our custom exception mapper.
+
+h3. Ajax requests
+
+To control the behavior in Ajax requests the application may use @org.apache.wicket.settings.IExceptionSettings#setAjaxErrorHandlingStrategy(IExceptionSettings.AjaxErrorStrategy)@. By default if an error occurs during the
+processing of an Ajax request Wicket will render the configured error page. By configuring @org.apache.wicket.settings.IExceptionSettings.AjaxErrorStrategy#INVOKE_FAILURE_HANDLER@ as the default strategy the application will call the JavaScript @onFailure@ callback(s) instead.
\ No newline at end of file
Modified: wicket/common/site/trunk/_site/guide/guide/testing.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/testing.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/testing.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/testing.html Mon Nov 3 07:53:10 2014
@@ -430,7 +430,7 @@ formTester.submit(<span class="java-
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/testingspring.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/testingspring.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/testingspring.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/testingspring.html Mon Nov 3 07:53:10 2014
@@ -324,7 +324,7 @@ Since the development of many web applic
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/urls.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/urls.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/urls.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/urls.html Mon Nov 3 07:53:10 2014
@@ -369,7 +369,7 @@ setResponsePage(MountedPageWithPlacehold
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/versioningCaching.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/versioningCaching.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/versioningCaching.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/versioningCaching.html Mon Nov 3 07:53:10 2014
@@ -293,7 +293,7 @@ Page '<page class>' is not state
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/whyLearn.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/whyLearn.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/whyLearn.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/whyLearn.html Mon Nov 3 07:53:10 2014
@@ -247,7 +247,7 @@ Wicket is not the only component oriente
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>
Modified: wicket/common/site/trunk/_site/guide/guide/wicketstuff.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/wicketstuff.html?rev=1636285&r1=1636284&r2=1636285&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/wicketstuff.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/wicketstuff.html Mon Nov 3 07:53:10 2014
@@ -324,7 +324,7 @@ To write/read objects to response/from r
<div id="footer">
Copyright © 2013-2014 â <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a>
- â <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
+ â <b style="color:#E8590A !important;">(Generated on: 2014-11-03)</b>
</div>