You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2014/09/09 17:02:41 UTC

svn commit: r1623842 [9/10] - in /wicket/common/site/trunk/_site/guide: ./ gapi/ gapi/DefaultPackage/ gapi/spring/ guide/ guide/pages/ guide/src/docs/guide/ guide/src/docs/guide/i18n/ guide/src/docs/guide/internals/ guide/src/docs/guide/versioningCachi...

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=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/single.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/single.html Tue Sep  9 15:02:36 2014
@@ -71,13 +71,15 @@ function addJsClass(el) {
                             
                             <div class="toc-item" style="margin-left:0"><a href="#bestpractices"><strong>24</strong><span>Wicket Best Practices</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0"><a href="#maven"><strong>25</strong><span>Working with Maven (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0"><a href="#internals"><strong>25</strong><span>Wicket Internals</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0"><a href="#wicketstuff"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0"><a href="#maven"><strong>26</strong><span>Working with Maven (Appendix)</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0"><a href="#redirects"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0"><a href="#wicketstuff"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0"><a href="#contributing"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0"><a href="#redirects"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a></div>
+                            
+                            <div class="toc-item" style="margin-left:0"><a href="#contributing"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a></div>
                             
                         </div>
                     </div>
@@ -462,29 +464,33 @@ function addJsClass(el) {
                             
                             <div class="toc-item" style="margin-left:10px"><a href="#bestpractices_17"><strong>24.17</strong><span>Summary</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0px"><a href="#maven"><strong>25</strong><span>Working with Maven (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0px"><a href="#internals"><strong>25</strong><span>Wicket Internals</span></a></div>
+                            
+                            <div class="toc-item" style="margin-left:10px"><a href="#pagestoring"><strong>25.1</strong><span>Page storing</span></a></div>
+                            
+                            <div class="toc-item" style="margin-left:0px"><a href="#maven"><strong>26</strong><span>Working with Maven (Appendix)</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#maven_1"><strong>25.1</strong><span>Switching Wicket to DEPLOYMENT mode</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#maven_1"><strong>26.1</strong><span>Switching Wicket to DEPLOYMENT mode</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#maven_2"><strong>25.2</strong><span>Creating a Wicket project from scratch and importing it into our favourite IDE</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#maven_2"><strong>26.2</strong><span>Creating a Wicket project from scratch and importing it into our favourite IDE</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_1"><strong>26.1</strong><span>What is project WicketStuff</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_1"><strong>27.1</strong><span>What is project WicketStuff</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_2"><strong>26.2</strong><span>Module tinymce</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_2"><strong>27.2</strong><span>Module tinymce</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_3"><strong>26.3</strong><span>Module wicketstuff-gmap3</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_3"><strong>27.3</strong><span>Module wicketstuff-gmap3</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_4"><strong>26.4</strong><span>Module wicketstuff-googlecharts</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_4"><strong>27.4</strong><span>Module wicketstuff-googlecharts</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_5"><strong>26.5</strong><span>Module wicketstuff-inmethod-grid</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_5"><strong>27.5</strong><span>Module wicketstuff-inmethod-grid</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_6"><strong>26.6</strong><span>Module wicketstuff-rest-annotations</span></a></div>
+                            <div class="toc-item" style="margin-left:10px"><a href="#wicketstuff_6"><strong>27.6</strong><span>Module wicketstuff-rest-annotations</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0px"><a href="#redirects"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0px"><a href="#redirects"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a></div>
                             
-                            <div class="toc-item" style="margin-left:0px"><a href="#contributing"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a></div>
+                            <div class="toc-item" style="margin-left:0px"><a href="#contributing"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a></div>
                             
                             <div style="clear:both" ></div>
                         </div>
@@ -1160,8 +1166,7 @@ Stateless pages are never versioned and 
 			&#125;
 		&#125;);<p class="paragraph"/>	&#125;	
 &#125;</pre></div><p class="paragraph"/>Now if we run the new example (project LifeCycleStagesRevisited) and we click on the “Reload” button, a new page version is created and the page id is increased by one:<p class="paragraph"/><img border="0" class="center" src="../img/reload-page.png"></img><p class="paragraph"/>If we press the back button the page version previously rendered (and serialized) will be retrieved (i.e. deserialized) and it will be used again to respond to our request (and page id is decremented):<p class="paragraph"/><img border="0" class="center" src="../img/browser-back.png"></img><p class="paragraph"/><blockquote class="note">
-For more details about page storing you can visit the wiki page at https://cwiki.apache.org/confluence/display/WICKET/Page+Storage . 
-On this page you can find which classes are involved into page storing mechanism and how they work together.
+For more details about page storing you can take a look at paragraph "Page storing" from chapter "Wicket Internals". The content of this paragraph is from wiki page https://cwiki.apache.org/confluence/display/WICKET/Page+Storage. 
 </blockquote><p class="paragraph"/>As we have stated at the beginning of this chapter, page versions are stored using Java serialization, therefore every object referenced inside a page must be serializable. In paragraph 9.6 we will see how to overcome this limit and work with non-serializable objects in our components using detachable Wicket models.<p class="paragraph"/><h3>Using a specific page version with PageReference</h3><p class="paragraph"/>To retrieve a specific page version in our code we can use class <code>org.apache.wicket.PageReference</code> by providing its constructor with the corresponding page id:<p class="paragraph"/><div class="code"><pre>//load page version with page id = 3
 PageReference pageReference = <span class="java&#45;keyword">new</span> PageReference(3);
 //load the related page instance
@@ -2423,7 +2428,12 @@ Providing a full description of Java sup
 
 <h2 id="i18n_2">14.2 Localization in Wicket</h2>
 <p class="paragraph"/>A component can get the current locale in use calling its method getLocale(). By default this method will be recursively called on component's parent containers until one of them returns a valid locale. If no one of them returns a locale, this method will get the one associated with the current user session. This locale is automatically generated by Wicket in accordance with the language settings of the browser.<p class="paragraph"/>Developers can change the locale of the current session with Session's method setLocale (Locale locale):<p class="paragraph"/><div class="code"><pre>Session.get().setLocale(locale)</pre></div><p class="paragraph"/><h3>Style and variation parameters for bundles</h3><p class="paragraph"/>In addition to locale's informations, Wicket supports two further parameters to identify a resource bundle: style and variation. Parameter style is a string value and is defined at session-level. To set/get the style for the current session we can use
  the corresponding setter and getter of class Session:<p class="paragraph"/><div class="code"><pre>Session.get().setStyle(<span class="java&#45;quote">"myStyle"</span>);
-Session.get().getStyle();</pre></div><p class="paragraph"/>If set, style's value contributes to the final full name of the bundle and it is placed between the base name and the locale's informations:<p class="paragraph"/><div class="code"><pre>&#60;base name&#62;&#91; <em class="italic">style&#93;&#91;</em> &#60;language code&#62;&#91; <em class="italic">&#60;COUNTRY_CODE&#62;&#91;</em> &#60;variant code&#62;&#93;&#93;&#93;</pre></div><p class="paragraph"/>Wicket gives the priority to candidate names containing the style information (if available). The other parameter we can use for localization is variation. Just like style also variation is a string value, but it is defined at component-level. The value of variation is returned by Component's method getVariation(). By default this method returns the variation of the parent component or a null value if a component hasn't a parent (i.e. it's a page). If we want to customize this parameter we must overwrite method  getVariation and m
 ake it return the desired value.<p class="paragraph"/>Variation's value contributes to the final full name of the bundle and is placed before style parameter:<p class="paragraph"/><div class="code"><pre>&#60;base name&#62;&#91; <em class="italic">variation&#93;&#91;_style&#93;&#91;</em> &#60;language code&#62;&#91; <em class="italic">&#60;COUNTRY_CODE&#62;&#91;</em> &#60;variant code&#62;&#93;&#93;&#93;</pre></div><p class="paragraph"/><h3>Using XML files as resource bundles</h3><p class="paragraph"/>Java uses the standard character set <a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1" target="blank">ISO 8859-11</a> to encode text files like properties files. Unfortunately ISO 8859-1 does not support most of the extra-European languages like Chinese or Japanese. The only way to use properties files with such languages is to use escaped <a href="http://en.wikipedia.org/wiki/List_of_Unicode_characters" target="blank">Unicode</a> characters, but this leads to not human-readable fil
 es. For example if we wanted to write the word 'website' in simplified Chinese (the ideograms are 网站) we should write the Unicode characters <code>&#117;7F51&#117;7AD9</code>. That's why starting from version 1.5, Java introduced the support for XML files as resource bundles. XML files are generally encoded with character sets UTF-8 or UTF-16 which support every symbol of the Unicode standard. In order to be a valid resource bundle the XML file must conform to the DTD available at <a href="http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd" target="blank">http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd</a> .<p class="paragraph"/>Here is an example of XML resource bundle taken from project LocalizedGreetings (file WicketApplication_zh.properties.xml) containing the translation in simplified Chinese of the greeting message “Welcome to the website!”:<p class="paragraph"/><div class="code"><pre><span class="xml&#45;tag">&#60;?xml ve
 rsion=<span class="xml&#45;quote">"1.0"</span> encoding=<span class="xml&#45;quote">"UTF&#45;8"</span>?&#62;</span>
+Session.get().getStyle();</pre></div><p class="paragraph"/>If set, style's value contributes to the final full name of the bundle and it is placed between the base name and the locale's informations:<p class="paragraph"/><div class="code"><pre>&#60;base name&#62;&#91; <em class="italic">style&#93;&#91;</em> &#60;language code&#62;&#91; <em class="italic">&#60;COUNTRY_CODE&#62;&#91;</em> &#60;variant code&#62;&#93;&#93;&#93;</pre></div><p class="paragraph"/>Wicket gives the priority to candidate names containing the style information (if available). The other parameter we can use for localization is variation. Just like style also variation is a string value, but it is defined at component-level. The value of variation is returned by Component's method getVariation(). By default this method returns the variation of the parent component or a null value if a component hasn't a parent (i.e. it's a page). If we want to customize this parameter we must overwrite method  getVariation and m
 ake it return the desired value.<p class="paragraph"/>Variation's value contributes to the final full name of the bundle and is placed before style parameter:<p class="paragraph"/><div class="code"><pre>&#60;base name&#62;&#91; <em class="italic">variation&#93;&#91;_style&#93;&#91;</em> &#60;language code&#62;&#91; <em class="italic">&#60;COUNTRY_CODE&#62;&#91;</em> &#60;variant code&#62;&#93;&#93;&#93;</pre></div><p class="paragraph"/>
+<h3>Using UTF-8 for resource bundles</h3><p class="paragraph"/>Java uses the standard character set <a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1" target="blank">ISO 8859-11</a> to encode text files like properties files. Unfortunately ISO 8859-1 does not support most of the extra-European languages like Chinese or Japanese. The only way to use properties files with such languages is to use escaped <a href="http://en.wikipedia.org/wiki/List_of_Unicode_characters" target="blank">Unicode</a> characters, but this leads to not human-readable files. For example if we wanted to write the word 'website' in simplified Chinese (the ideograms are 网站) we should write the Unicode characters <code>&#117;7F51&#117;7AD9</code>.
+For this reason ISO 8859-11 is being replaced with another Unicode-compliant character encoding called UTF-8. Text files created with this encoding can contain Unicode symbols in plain format.
+Wicket provides a useful convention to use properties file encoded with UTF-8. We just have to add prefix <code>.utf8.</code> to file extension (i.e. <code>.utf8.properties</code>).<p class="paragraph"/><blockquote class="note">
+If you want to use UTF-8 with your text files, make sure that your editor/IDE is actually using this character encoding. Some OS like Windows use a different encoding by default.
+</blockquote><p class="paragraph"/><h3>Using XML files as resource bundles</h3><p class="paragraph"/>Starting from version 1.5, Java introduced the support for XML files as resource bundles. XML files are generally encoded with character sets UTF-8 or UTF-16 which support every symbol of the Unicode standard. In order to be a valid resource bundle the XML file must conform to the DTD available at <a href="http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd" target="blank">http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd</a> .<p class="paragraph"/>Here is an example of XML resource bundle taken from project LocalizedGreetings (file WicketApplication_zh.properties.xml) containing the translation in simplified Chinese of the greeting message “Welcome to the website!”:<p class="paragraph"/><div class="code"><pre><span class="xml&#45;tag">&#60;?xml version=<span class="xml&#45;quote">"1.0"</span> encoding=<span class="xml&#45;quote">"UTF&#45;8"<
 /span>?&#62;</span>
 &#60;!DOCTYPE properties SYSTEM <span class="xml&#45;quote">"http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd"</span>&#62;
 <span class="xml&#45;tag">&#60;properties&#62;</span>
 	<span class="xml&#45;tag">&#60;entry key=<span class="xml&#45;quote">"greetingMessage"</span>&#62;</span>欢迎光临本网站!<span class="xml&#45;tag">&#60;/entry&#62;</span>
@@ -4432,12 +4442,47 @@ add(settings);</pre></div><p class="para
 <p class="paragraph"/>The best practices presented in this chapter should help you to write better and more maintainable code in Wicket. All described methodologies were already proven in a few Wicket projects. If you follow these advices, your Wicket projects will get future-proof and hopefully successful.
 
 
-<h1 id="maven">25 Working with Maven (Appendix)</h1>
+<h1 id="internals">25 Wicket Internals</h1>
+
+
+
+<h2 id="pagestoring">25.1 Page storing</h2>
+During request handling, Wicket manages page instances through interface <code>org.apache.wicket.request.handler.IPageProvider</code>. This interface creates a new page instance or loads a previously serialized page instance if we provide the corrisponding page id. <code>IPageProvider</code> delegates page creation and retrieval to interface <code>org.apache.wicket.request.mapper.IPageSource</code>.
+When page class is provided <code>IPageSource</code> delegates page creation to interface <code>org.apache.wicket.IPageFactory</code>, while when page id is provided it uses interface <code>org.apache.wicket.page.IPageManager</code> to load the previously serialized page.<p class="paragraph"/>The following workflow diagram summarizes the mechanism seen so far:<p class="paragraph"/><img border="0" class="center" src="../img/page-storage.png"></img><p class="paragraph"/><h3>IPageManager</h3><p class="paragraph"/><code>org.apache.wicket.page.IPageManager</code>'s task is to manage which pages have been used in a request and store their last state in the backing stores, namely <code>IPageStore</code>.
+The default implementation <code>org.apache.wicket.page.PageStoreManager</code> collects all stateful pages which have been used in the request cycle (more than one page can be used in a single request if for example <code>setResponsePage()</code> or <code>RestartResponseException</code> is used).
+At the end of the request all collected page instances are being stored in the first level cache - http session. They are stored in http session attribute named <code>"wicket:persistentPageManagerData-APPLICATION_NAME"</code> and passed to the underlying <code>IPageStore</code>.
+When the next http request comes <code>IPageProvider</code> will ask for page with specific id and <code>PageStoreManager</code> will look first in the http session and if no match is found then it will delegate to the IPageStore. At the end of the second request the http session based cache is being overwritten completely with the newly used page instances.<p class="paragraph"/>To setup another <code>IPageManager</code> implementation use <code>org.apache.wicket.Application.setPageManagerProvider(IPageManagerProvider)</code>.
+The custom <code>IPageManager</code> implementation may or may not use <code>IPageStore/IDataStore</code>.<p class="paragraph"/><h3>IPageStore</h3><p class="paragraph"/><code>org.apache.wicket.pageStore.IPageStore</code>'s role is to mediate the storing and loading of pages done by the underlying <code>IDataStore</code>. The default implementation <code>org.apache.wicket.pageStore.DefaultPageStore</code> pre-processes the pages before passing them to <code>IDataStore#storeData(String, int, byte)</code> and to post-processes them after <code>IDataStore#getData(String, int)</code>. The processing consists of transforming the page instance to <code>org.apache.wicket.pageStore.DefaultPageStore.SerializedPage</code>. This is a struct of:<p class="paragraph"/><div class="code"><pre>&#123;
+   sessionId: <span class="java&#45;object">String</span>,
+   pageId : <span class="java&#45;object">int</span>,
+   data : <span class="java&#45;object">byte</span>&#91;&#93;
+&#125;</pre></div><p class="paragraph"/>i.e. this is the serialized page instance (data) plus additional information needed to be able to easily find it later (sessionId, pageId).<p class="paragraph"/>When a <code>SerializedPage</code> has to be stored <code>DefaultPageStore</code> stores it in a application scoped cache ({sessionId, pageId} -&#62; SerializedPage) and additionally gives it to the underlying <code>IDataStore#storeData(sessionId, pageId, data)</code>. The application scoped cache is used as second level cache. Getting a page from it is slower than the http session based cache in <code>PageStoreManager</code> because the page has to be deserialized, but is faster than the underlying <code>IDataStore</code> which stores the page bytes in some persistent store.<p class="paragraph"/>The size of the application scoped cache is configurable via <code>org.apache.wicket.settings.IStoreSettings.setInmemoryCacheSize(int)</code>.<p class="paragraph"/><h3>IDataStore</h3><p class=
 "paragraph"/><code>org.apache.wicket.pageStore.IDataStore</code> is used to persist Wicket pages (as bytes) to a persistent store like e.g. files or databases. The default implementation is <code>org.apache.wicket.pageStore.DiskDataStore</code> which as its name says stores the pages in files. The location of the folder where the files are stored is configurable via <code>org.apache.wicket.settings.IStoreSettings.setFileStoreFolder(File)</code>, by default the web container's work folder is used (ServletContext attribute 'javax.servlet.context.tempdir'). In this folder a sub-folder is created named <code>'applicationName-filestore'</code>. 
+This folder contains a sub-folder for each active http session. This session folder contains a single file named 'data' which contains the bytes for the pages. The size of this 'data' file is configurable via <code>org.apache.wicket.settings.IStoreSettings.setMaxSizePerSession(Bytes)</code>. When this size is exceeded the newly stored files overwrite the oldest ones.<p class="paragraph"/><h3>AsynchronousDataStore</h3><p class="paragraph"/>By default Wicket wraps <code>DiskDataStore</code> with <code>org.apache.wicket.pageStore.AsynchronousDataStore</code>. The role of <code>AsynchronousDataStore</code> is to detach the http worker thread from waiting for the write of the page bytes to the disk.
+To disable it use: <code>org.apache.wicket.settings.IStoreSettings.setAsynchronous(false)</code>. AsynchronousDataStore can delay the storage of pages' bytes for at most <code>org.apache.wicket.settings.IStoreSettings.setAsynchronousQueueCapacity(int)</code> pages. If this capacity is exceeded then the page's bytes are written synchronously to the backing <code>IDataStore</code>.<p class="paragraph"/><h3>DebugDiskDataStore</h3><p class="paragraph"/>Wicket provides an extension of <code>DiskDataStore</code> that can be used to browse the content of the 'data' files created by <code>DiskDataStore</code>. This debug enabled <code>DiskDataStore</code> is automatically setup when wicket-devutils.jar is in the classpath.
+The debug information can be seen at http://host:port/context/wicket/internal/debug/diskDataStore<p class="paragraph"/><h3>HttpSessionDataStore</h3><p class="paragraph"/>In some environments like Google AppEngine it is not allowed to write to the file system and thus <code>DiskDataStore</code> cannot be used. In this case <code>org.apache.wicket.pageStore.memory.HttpSessionDataStore</code> can be used as replacement. This implementation of <code>IDataStore</code> is not persistent and puts all the data in the http session.
+Wicket comes with 2 default eviction strategies to keep the size of the http session reasonable:
+<ul class="star">
+<li><strong class="bold">org.apache.wicket.pageStore.memory.PageNumberEvictionStrategy</strong> - specifies how many pages can be hold</li>
+<li><strong class="bold">org.apache.wicket.pageStore.memory.MemorySizeEvictionStrategy</strong> - specifies the maximum amount of memory for pages per http session.</li>
+</ul><p class="paragraph"/>To configure it:
+<div class="code"><pre>MyApp&#35;init()
+&#123;
+   <span class="java&#45;keyword">super</span>.init();<p class="paragraph"/>   setPageManagerProvider(<span class="java&#45;keyword">new</span> DefaultPageManagerProvider()
+   &#123;
+       <span class="java&#45;keyword">protected</span> IDataStore newDataStore()
+       &#123;
+           <span class="java&#45;keyword">return</span>  <span class="java&#45;keyword">new</span> HttpSessionDataStore(pageManagerContext, <span class="java&#45;keyword">new</span> PageNumberEvictionStrategy(20));
+       &#125;
+   &#125;
+&#125;</pre></div><p class="paragraph"/>
+
+
+<h1 id="maven">26 Working with Maven (Appendix)</h1>
 
 
 
 
-<h2 id="maven_1">25.1 Switching Wicket to DEPLOYMENT mode</h2>
+<h2 id="maven_1">26.1 Switching Wicket to DEPLOYMENT mode</h2>
 <p class="paragraph"/>As pointed out in the note at page 9, Wicket can be started in two modes, DEVELOPMENT and DEPLOYMENT. When we are in DEVELOPMENT mode Wicket warns us at application startup with the following message:<p class="paragraph"/><div class="code"><pre>&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;
 &#42;&#42;&#42; WARNING: Wicket is running in DEVELOPMENT mode.              &#42;&#42;&#42;
 &#42;&#42;&#42;                               ^^^^^^^^^^^                    &#42;&#42;&#42;
@@ -4460,7 +4505,7 @@ add(settings);</pre></div><p class="para
 &#60;/context&#45;param&#62;</pre></div><p class="paragraph"/>The third way to set the running mode is using system property wicket.configuration. This parameter can be specified in the command line that starts up the server:<p class="paragraph"/><div class="code"><pre>java &#45;Dwicket.configuration=deployment ...</pre></div><p class="paragraph"/>Remember that system properties overwrite other settings, so they are ideal to ensure that on production machine the running mode will be always set to DEPLOYMENT. 
 
 
-<h2 id="maven_2">25.2 Creating a Wicket project from scratch and importing it into our favourite IDE</h2>
+<h2 id="maven_2">26.2 Creating a Wicket project from scratch and importing it into our favourite IDE</h2>
 <p class="paragraph"/><blockquote class="note">
 In order to follow the instructions of this paragraph you must have Maven installed on your system. The installation of Maven is out of the scope of this guide but you can easily find an extensive documentation about it on Internet.
 Another requirement is a good Internet connection (a flat ADSL is enough) because Maven needs to connect to its central repository to download the required dependencies. 
@@ -4527,11 +4572,11 @@ With Eclipse we can install one of the p
 QWickie is released under ASF 2.0 license.
 
 
-<h1 id="wicketstuff">26 Project WicketStuff (Appendix)</h1>
+<h1 id="wicketstuff">27 Project WicketStuff (Appendix)</h1>
 
 
 
-<h2 id="wicketstuff_1">26.1 What is project WicketStuff</h2>
+<h2 id="wicketstuff_1">27.1 What is project WicketStuff</h2>
 <p class="paragraph"/>WicketStuff is an umbrella project that gathers different Wicket-related projects developed and maintained by the community. The project is hosted on GitHub at <a href="https://github.com/wicketstuff/core." target="blank">https://github.com/wicketstuff/core</a> Every module is structured as a parent Maven project containing the actual project that implements the new functionality and an example project that illustrates how to use it in our code. The resulting directory structure of each module is the following:<p class="paragraph"/><div class="code"><pre>&#60;module name&#62;&#45;parent
         |
         +&#45;&#45;&#45;&#60;module name&#62;
@@ -4540,7 +4585,7 @@ Every WicketStuff module can be download
 </blockquote>
 
 
-<h2 id="wicketstuff_2">26.2 Module tinymce</h2>
+<h2 id="wicketstuff_2">27.2 Module tinymce</h2>
 <p class="paragraph"/>Module tinymce offers integration with the namesake JavaScript library that turns our “humble” text-areas into a full-featured HTML WYSIWYG editor:<p class="paragraph"/><img border="0" class="center" src="../img/tinymce.png"></img><p class="paragraph"/>To “tinyfy” a textarea component we must use behavior TinyMceBehavior:<p class="paragraph"/><div class="code"><pre>TextArea textArea = <span class="java&#45;keyword">new</span> TextArea(<span class="java&#45;quote">"textArea"</span>, <span class="java&#45;keyword">new</span> Model(<span class="java&#45;quote">""</span>));
 textArea.add(<span class="java&#45;keyword">new</span> TinyMceBehavior());</pre></div><p class="paragraph"/>By default TinyMceBehavior adds only a basic set of functionalities to our textarea:<p class="paragraph"/><img border="0" class="center" src="../img/tinymce_basic.png"></img><p class="paragraph"/>To add more functionalities we must use class TinyMCESettings to register additional TinyMCE plugins and to customize the toolbars buttons. The following code is an excerpt from example page FullFeaturedTinyMCEPage:<p class="paragraph"/><div class="code"><pre>TinyMCESettings settings = <span class="java&#45;keyword">new</span> TinyMCESettings(
                        TinyMCESettings.Theme.advanced);
@@ -4568,7 +4613,7 @@ textArea.add(<span class="java&#45;keywo
 
 
 
-<h2 id="wicketstuff_3">26.3 Module wicketstuff-gmap3</h2>
+<h2 id="wicketstuff_3">27.3 Module wicketstuff-gmap3</h2>
 <p class="paragraph"/>Module wicketstuff-gmap3 integrates <a href="http://maps.google.com" target="blank">Google Maps</a> service with Wicket providing component org.wicketstuff.gmap.GMap. If we want to embed Google Maps into one of our pages we just need to add component GMap inside the page. The following snippet is taken from example page SimplePage:<p class="paragraph"/><strong class="bold">HTML:</strong><p class="paragraph"/><div class="code"><pre>&#8230;
 &#60;body&#62;
   &#60;div wicket:id=<span class="java&#45;quote">"map"</span>&#62;Map&#60;/div&#62;
@@ -4587,7 +4632,7 @@ textArea.add(<span class="java&#45;keywo
 &#125;</pre></div><p class="paragraph"/>The component defines a number of setters to customize its behavior and appearance. More info can be found on wiki page <a href="https://github.com/wicketstuff/core/wiki/Gmap3" target="blank">https://github.com/wicketstuff/core/wiki/Gmap3</a> .
 
 
-<h2 id="wicketstuff_4">26.4 Module wicketstuff-googlecharts</h2>
+<h2 id="wicketstuff_4">27.4 Module wicketstuff-googlecharts</h2>
 <p class="paragraph"/>To integrate the <a href="https://developers.google.com/chart/" target="blank">Google Chart</a> tool into our pages we can use module wicketstuff-googlecharts. To display a chart we must combine the following entities: component Chart, interface IChartData and class ChartProvider, all inside package org.wicketstuff.googlecharts. The following snippet is taken from example page Home:<p class="paragraph"/><strong class="bold">HTML:</strong><p class="paragraph"/><div class="code"><pre>&#8230;
   &#60;h2&#62;Hello World&#60;/h2&#62;
   &#60;img wicket:id=<span class="java&#45;quote">"helloWorld"</span>/&#62;
@@ -4600,7 +4645,7 @@ provider.setPieLabels(<span class="java&
 add(<span class="java&#45;keyword">new</span> Chart(<span class="java&#45;quote">"helloWorld"</span>, provider));</pre></div><p class="paragraph"/><strong class="bold">Displayed chart:</strong><p class="paragraph"/><img border="0" class="center" src="../img/googlechart.png"></img><p class="paragraph"/>As we can see in the snippet above, component Chart must be used with &#60;img&#62; tag while the input data returned by IChartData must be a two-dimensional array of double values. 
 
 
-<h2 id="wicketstuff_5">26.5 Module wicketstuff-inmethod-grid</h2>
+<h2 id="wicketstuff_5">27.5 Module wicketstuff-inmethod-grid</h2>
 <p class="paragraph"/>Module wicketstuff-inmethod-grid implements a sophisticated grid-component with class com. inmethod.grid.datagrid.DataGrid.<p class="paragraph"/>Just like pageable repeaters (seen in paragraph 11.4) DataGrid provides data pagination and uses interface IDataProvider as data source. In addition the component is completely ajaxified:<p class="paragraph"/><img border="0" class="center" src="../img/inmethod-grid1.png"></img><p class="paragraph"/>DataGrid supports also editable cells and row selection:<p class="paragraph"/><img border="0" class="center" src="../img/inmethod-grid2.png"></img><p class="paragraph"/>The following snippet illustrate how to use DataGrid and is taken from wiki page <a href="https://github.com/wicketstuff/core/wiki/InMethodGrid" target="blank">https://github.com/wicketstuff/core/wiki/InMethodGrid</a> :<p class="paragraph"/><strong class="bold">HTML:</strong><p class="paragraph"/><div class="code"><pre>&#8230;
   &#60;div wicket:id=<span class="java&#45;quote">"grid"</span>&#62;Grid&#60;/div&#62;
 ...</pre></div><p class="paragraph"/><strong class="bold">Java code:</strong><p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">final</span> List&#60;Person&#62; personList = //load a list of Persons
@@ -4612,7 +4657,7 @@ List&#60;IGridColumn&#62; cols = (List) 
 add(grid);</pre></div><p class="paragraph"/>In the code above we have used convenience class DefaultDataGrid that is a subclass of DataGrid and it already comes with a navigation toolbar.<p class="paragraph"/>The example pages are under package com.inmethod.grid.examples.pages in the example project which is hosted at <a href="http://www.wicket-library.com/inmethod-grid/data-grid/simple" target="blank">http://www.wicket-library.com/inmethod-grid/data-grid/simple</a> .<p class="paragraph"/>
 
 
-<h2 id="wicketstuff_6">26.6 Module wicketstuff-rest-annotations</h2>
+<h2 id="wicketstuff_6">27.6 Module wicketstuff-rest-annotations</h2>
 REST-based API are becoming more and more popular around the web and the number of services based on this architecture is constantly increasing.<p class="paragraph"/>Wicket is well-known for its capability of transparently handling the state of web applications on server side, but it can be also easily adopted to create RESTful services.
 WicketStuff module for REST provides a special resource class and a set of annotations to implement REST APIs/services in much the same way as we do it with Spring MVC or with the standard JAX-RS.<p class="paragraph"/>The module provides class <code>AbstractRestResource</code> as generic abstract class to implement a Wicket resource that handles the request and the response using a particular data format (XML, JSON, etc...).
 Subclassing <code>AbstractRestResource</code> we can create custom resources and map their pubblic methods to a given subpath with annotation <code>MethodMapping</code>. The following snippet is taken from resource <code>PersonsRestResource</code> inside module <code>'restannotations-examples'</code>:<p class="paragraph"/><div class="code"><pre>@MethodMapping(<span class="java&#45;quote">"/persons"</span>)
@@ -4640,7 +4685,7 @@ To write/read objects to response/from r
 
 
 
-<h1 id="redirects">27 Lost In Redirection With Apache Wicket (Appendix)</h1>
+<h1 id="redirects">28 Lost In Redirection With Apache Wicket (Appendix)</h1>
 Quite a few teams have already got stuck into the following problem when working with wicket forms in a clustered environment while having 2 (or more) tomcat server with enabled session replication running.<p class="paragraph"/>In case of invalid data being submitted with a form instance for example, it seemed like according error messages wouldn’t be presented when the same form page gets displayed again. Sometimes! And sometimes they would! One of those nightmares of rather deterministic programmer’s life. This so called Lost In Redirection problem, even if it looks like a wicket bug at first, is rather a result of a default setting in wicket regarding the processing of form submissions in general. In order to prevent another wide known problem of double form submissions, Wicket uses a so called REDIRECT_TO_BUFFER strategy for dealing with rendering a page after web form’s processing (@see IRequestCycleSettings#RenderStrategy).<p class="paragraph"/>What does the def
 ault RenderStrategy actually do?<p class="paragraph"/>Both logical parts of a single HTTP request, an action and a render part get processed within the same request, but instead of streaming the render result to the browser directly, the result is cached on the server first.<p class="paragraph"/><img border="0" class="center" src="../img/lost-in-redirection-mockup.png"></img><p class="paragraph"/>Wicket will create an according BufferedHttpServletResponse instance that will be used to cache the resulting HttpServletResponse within the WebApplication.<p class="paragraph"/><img border="0" class="center" src="../img/lost-in-redirection-mockup2.png"></img><p class="paragraph"/>After the buffered response is cached the HTTP status code of 302 get’s provided back to the browser resulting in an additional GET request to the redirect URL (which Wicket sets to the URL of the Form itself). There is a special handling code for this case in the WicketFilter instance that then looks up a Ma
 p of buffered responses within the WebApplication accordingly. If an appropriate already cached response for the current request is found, it get’s streamed back to the browser immediately. No additional form processing happens now. The following is a code snippet taken from WicketFilter:<p class="paragraph"/><div class="code"><pre>// Are we using REDIRECT_TO_BUFFER?
 <span class="java&#45;keyword">if</span> (webApplication.getRequestCycleSettings().getRenderStrategy() == IRequestCycleSettings.REDIRECT_TO_BUFFER)
 &#123;
@@ -4679,7 +4724,7 @@ Quite a few teams have already got stuck
 &#125;</pre></div><p class="paragraph"/>ONE_PASS_RENDER RenderStrategy does not solve the double submit problem though! So this way you’d only be trading one problem for another one actually.<p class="paragraph"/>You could of course turn on the session stickiness between your load balancer (apache server) and your tomcat server additionally to the session replication which would be the preferred solution in my opinion.<p class="paragraph"/><img border="0" class="center" src="../img/lost-in-redirection-mockup4.png"></img><p class="paragraph"/>Session replication would still provide you with failover in case one of the tomcat server dies for whatever reason and sticky sessions would ensure that the Lost In Redirection problem does not occur any more.<p class="paragraph"/>
 
 
-<h1 id="contributing">28 Contributing to this guide (Appendix)</h1>
+<h1 id="contributing">29 Contributing to this guide (Appendix)</h1>
 You can contribute to this guide by following these steps:
 <ul class="star">
 <li>The guide uses Grails GDoc to generate the final HTML/PDF so you should consult with its <a href="http://grails.org/WikiSyntax" target="blank">syntax</a>.</li>
@@ -4722,7 +4767,7 @@ and attach it to a ticket in Apache Wick
         <div id="footer">
             
 Copyright &copy; 2013-2014 — <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a> 
-                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-06)</b>
+                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
 
             
         </div>

Modified: wicket/common/site/trunk/_site/guide/guide/single.pdf
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/single.pdf?rev=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
Binary files - no diff available.

Modified: wicket/common/site/trunk/_site/guide/guide/src/docs/guide/i18n/i18n_2.gdoc
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/src/docs/guide/i18n/i18n_2.gdoc?rev=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/src/docs/guide/i18n/i18n_2.gdoc (original)
+++ wicket/common/site/trunk/_site/guide/guide/src/docs/guide/i18n/i18n_2.gdoc Tue Sep  9 15:02:36 2014
@@ -31,9 +31,20 @@ Variation's value contributes to the fin
 <base name>[_variation][_style][_<language code>[_<COUNTRY_CODE>[_<variant code>]]]
 {code}
 
+
+h3. Using UTF-8 for resource bundles
+
+Java uses the standard character set "ISO 8859-11":http://en.wikipedia.org/wiki/ISO/IEC_8859-1 to encode text files like properties files. Unfortunately ISO 8859-1 does not support most of the extra-European languages like Chinese or Japanese. The only way to use properties files with such languages is to use escaped "Unicode":http://en.wikipedia.org/wiki/List_of_Unicode_characters characters, but this leads to not human-readable files. For example if we wanted to write the word 'website' in simplified Chinese (the ideograms are 网站) we should write the Unicode characters @\u7F51\u7AD9@.
+For this reason ISO 8859-11 is being replaced with another Unicode-compliant character encoding called UTF-8. Text files created with this encoding can contain Unicode symbols in plain format.
+Wicket provides a useful convention to use properties file encoded with UTF-8. We just have to add prefix @.utf8.@ to file extension (i.e. @.utf8.properties@).
+
+{note}
+If you want to use UTF-8 with your text files, make sure that your editor/IDE is actually using this character encoding. Some OS like Windows use a different encoding by default.
+{note}
+
 h3. Using XML files as resource bundles
 
-Java uses the standard character set "ISO 8859-11":http://en.wikipedia.org/wiki/ISO/IEC_8859-1 to encode text files like properties files. Unfortunately ISO 8859-1 does not support most of the extra-European languages like Chinese or Japanese. The only way to use properties files with such languages is to use escaped "Unicode":http://en.wikipedia.org/wiki/List_of_Unicode_characters characters, but this leads to not human-readable files. For example if we wanted to write the word 'website' in simplified Chinese (the ideograms are 网站) we should write the Unicode characters @\u7F51\u7AD9@. That's why starting from version 1.5, Java introduced the support for XML files as resource bundles. XML files are generally encoded with character sets UTF-8 or UTF-16 which support every symbol of the Unicode standard. In order to be a valid resource bundle the XML file must conform to the DTD available at "http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd":http://www.ora
 cle.com/webfolder/technetwork/jsc/dtd/properties.dtd .
+Starting from version 1.5, Java introduced the support for XML files as resource bundles. XML files are generally encoded with character sets UTF-8 or UTF-16 which support every symbol of the Unicode standard. In order to be a valid resource bundle the XML file must conform to the DTD available at "http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd":http://www.oracle.com/webfolder/technetwork/jsc/dtd/properties.dtd .
 
 Here is an example of XML resource bundle taken from project LocalizedGreetings (file WicketApplication_zh.properties.xml) containing the translation in simplified Chinese of the greeting message “Welcome to the website!”:
 

Added: wicket/common/site/trunk/_site/guide/guide/src/docs/guide/internals.gdoc
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/src/docs/guide/internals.gdoc?rev=1623842&view=auto
==============================================================================
    (empty)

Added: wicket/common/site/trunk/_site/guide/guide/src/docs/guide/internals/pagestoring.gdoc
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/src/docs/guide/internals/pagestoring.gdoc?rev=1623842&view=auto
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/src/docs/guide/internals/pagestoring.gdoc (added)
+++ wicket/common/site/trunk/_site/guide/guide/src/docs/guide/internals/pagestoring.gdoc Tue Sep  9 15:02:36 2014
@@ -0,0 +1,74 @@
+During request handling, Wicket manages page instances through interface @org.apache.wicket.request.handler.IPageProvider@. This interface creates a new page instance or loads a previously serialized page instance if we provide the corrisponding page id. @IPageProvider@ delegates page creation and retrieval to interface @org.apache.wicket.request.mapper.IPageSource@.
+When page class is provided @IPageSource@ delegates page creation to interface @org.apache.wicket.IPageFactory@, while when page id is provided it uses interface @org.apache.wicket.page.IPageManager@ to load the previously serialized page.
+
+The following workflow diagram summarizes the mechanism seen so far:
+
+!page-storage.png!
+
+h3. IPageManager
+
+@org.apache.wicket.page.IPageManager@'s task is to manage which pages have been used in a request and store their last state in the backing stores, namely @IPageStore@.
+The default implementation @org.apache.wicket.page.PageStoreManager@ collects all stateful pages which have been used in the request cycle (more than one page can be used in a single request if for example @setResponsePage()@ or @RestartResponseException@ is used).
+At the end of the request all collected page instances are being stored in the first level cache - http session. They are stored in http session attribute named @"wicket:persistentPageManagerData-APPLICATION_NAME"@ and passed to the underlying @IPageStore@.
+When the next http request comes @IPageProvider@ will ask for page with specific id and @PageStoreManager@ will look first in the http session and if no match is found then it will delegate to the IPageStore. At the end of the second request the http session based cache is being overwritten completely with the newly used page instances.
+
+To setup another @IPageManager@ implementation use @org.apache.wicket.Application.setPageManagerProvider(IPageManagerProvider)@.
+The custom @IPageManager@ implementation may or may not use @IPageStore/IDataStore@.
+
+h3. IPageStore
+
+@org.apache.wicket.pageStore.IPageStore@'s role is to mediate the storing and loading of pages done by the underlying @IDataStore@. The default implementation @org.apache.wicket.pageStore.DefaultPageStore@ pre-processes the pages before passing them to @IDataStore#storeData(String, int, byte[])@ and to post-processes them after @IDataStore#getData(String, int)@. The processing consists of transforming the page instance to @org.apache.wicket.pageStore.DefaultPageStore.SerializedPage@. This is a struct of:
+
+{code}
+{
+   sessionId: String,
+   pageId : int,
+   data : byte[]
+}
+{code}
+
+i.e. this is the serialized page instance (data) plus additional information needed to be able to easily find it later (sessionId, pageId).
+
+When a @SerializedPage@ has to be stored @DefaultPageStore@ stores it in a application scoped cache ({sessionId, pageId} -> SerializedPage) and additionally gives it to the underlying @IDataStore#storeData(sessionId, pageId, data)@. The application scoped cache is used as second level cache. Getting a page from it is slower than the http session based cache in @PageStoreManager@ because the page has to be deserialized, but is faster than the underlying @IDataStore@ which stores the page bytes in some persistent store.
+
+The size of the application scoped cache is configurable via @org.apache.wicket.settings.IStoreSettings.setInmemoryCacheSize(int)@.
+
+h3. IDataStore
+
+@org.apache.wicket.pageStore.IDataStore@ is used to persist Wicket pages (as bytes) to a persistent store like e.g. files or databases. The default implementation is @org.apache.wicket.pageStore.DiskDataStore@ which as its name says stores the pages in files. The location of the folder where the files are stored is configurable via @org.apache.wicket.settings.IStoreSettings.setFileStoreFolder(File)@, by default the web container's work folder is used (ServletContext attribute 'javax.servlet.context.tempdir'). In this folder a sub-folder is created named @'applicationName-filestore'@. 
+This folder contains a sub-folder for each active http session. This session folder contains a single file named 'data' which contains the bytes for the pages. The size of this 'data' file is configurable via @org.apache.wicket.settings.IStoreSettings.setMaxSizePerSession(Bytes)@. When this size is exceeded the newly stored files overwrite the oldest ones.
+
+h3. AsynchronousDataStore
+
+By default Wicket wraps @DiskDataStore@ with @org.apache.wicket.pageStore.AsynchronousDataStore@. The role of @AsynchronousDataStore@ is to detach the http worker thread from waiting for the write of the page bytes to the disk.
+To disable it use: @org.apache.wicket.settings.IStoreSettings.setAsynchronous(false)@. AsynchronousDataStore can delay the storage of pages' bytes for at most @org.apache.wicket.settings.IStoreSettings.setAsynchronousQueueCapacity(int)@ pages. If this capacity is exceeded then the page's bytes are written synchronously to the backing @IDataStore@.
+
+h3. DebugDiskDataStore
+
+Wicket provides an extension of @DiskDataStore@ that can be used to browse the content of the 'data' files created by @DiskDataStore@. This debug enabled @DiskDataStore@ is automatically setup when wicket-devutils.jar is in the classpath.
+The debug information can be seen at http://host:port/context/wicket/internal/debug/diskDataStore
+
+h3. HttpSessionDataStore
+
+In some environments like Google AppEngine it is not allowed to write to the file system and thus @DiskDataStore@ cannot be used. In this case @org.apache.wicket.pageStore.memory.HttpSessionDataStore@ can be used as replacement. This implementation of @IDataStore@ is not persistent and puts all the data in the http session.
+Wicket comes with 2 default eviction strategies to keep the size of the http session reasonable:
+
+* *org.apache.wicket.pageStore.memory.PageNumberEvictionStrategy* - specifies how many pages can be hold
+* *org.apache.wicket.pageStore.memory.MemorySizeEvictionStrategy* - specifies the maximum amount of memory for pages per http session.
+
+To configure it:
+{code}
+MyApp#init()
+{
+   super.init();
+ 
+   setPageManagerProvider(new DefaultPageManagerProvider()
+   {
+       protected IDataStore newDataStore()
+       {
+           return  new HttpSessionDataStore(pageManagerContext, new PageNumberEvictionStrategy(20));
+       }
+   }
+}
+{code}
+

Modified: wicket/common/site/trunk/_site/guide/guide/src/docs/guide/toc.yml
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/src/docs/guide/toc.yml?rev=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/src/docs/guide/toc.yml (original)
+++ wicket/common/site/trunk/_site/guide/guide/src/docs/guide/toc.yml Tue Sep  9 15:02:36 2014
@@ -194,6 +194,9 @@ bestpractices:
   bestpractices_15: Cut small classes and methods
   bestpractices_16: The argument "Bad documentation"
   bestpractices_17: Summary
+internals:
+  title: Wicket Internals
+  pagestoring: Page storing
 maven:
   title: Working with Maven (Appendix)
   maven_1: Switching Wicket to DEPLOYMENT mode

Modified: wicket/common/site/trunk/_site/guide/guide/src/docs/guide/versioningCaching/versioningCaching_2.gdoc
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/src/docs/guide/versioningCaching/versioningCaching_2.gdoc?rev=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/src/docs/guide/versioningCaching/versioningCaching_2.gdoc (original)
+++ wicket/common/site/trunk/_site/guide/guide/src/docs/guide/versioningCaching/versioningCaching_2.gdoc Tue Sep  9 15:02:36 2014
@@ -46,8 +46,7 @@ If we press the back button the page ver
 !browser-back.png!
 
 {note}
-For more details about page storing you can visit the wiki page at https://cwiki.apache.org/confluence/display/WICKET/Page+Storage . 
-On this page you can find which classes are involved into page storing mechanism and how they work together.
+For more details about page storing you can take a look at paragraph "Page storing" from chapter "Wicket Internals". The content of this paragraph is from wiki page https://cwiki.apache.org/confluence/display/WICKET/Page+Storage. 
 {note}
 
 As we have stated at the beginning of this chapter, page versions are stored using Java serialization, therefore every object referenced inside a page must be serializable. In paragraph 9.6 we will see how to overcome this limit and work with non-serializable objects in our components using detachable Wicket models.

Added: wicket/common/site/trunk/_site/guide/guide/src/docs/img/page-storage.png
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/src/docs/img/page-storage.png?rev=1623842&view=auto
==============================================================================
Binary file - no diff available.

Propchange: wicket/common/site/trunk/_site/guide/guide/src/docs/img/page-storage.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/testing.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/testing.html Tue Sep  9 15:02:36 2014
@@ -96,16 +96,19 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/bestpractices.html"><strong>24</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>25</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/internals.html"><strong>25</strong><span>Wicket Internals</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>26</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -427,7 +430,7 @@ formTester.submit(<span class="java&#45;
 <div id="footer">
     
 Copyright &copy; 2013-2014 — <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a> 
-                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-06)</b>
+                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</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=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/testingspring.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/testingspring.html Tue Sep  9 15:02:36 2014
@@ -96,16 +96,19 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/bestpractices.html"><strong>24</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>25</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/internals.html"><strong>25</strong><span>Wicket Internals</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>26</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -321,7 +324,7 @@ Since the development of many web applic
 <div id="footer">
     
 Copyright &copy; 2013-2014 — <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a> 
-                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-06)</b>
+                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</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=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/urls.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/urls.html Tue Sep  9 15:02:36 2014
@@ -96,16 +96,19 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/bestpractices.html"><strong>24</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>25</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/internals.html"><strong>25</strong><span>Wicket Internals</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>26</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -366,7 +369,7 @@ setResponsePage(MountedPageWithPlacehold
 <div id="footer">
     
 Copyright &copy; 2013-2014 — <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a> 
-                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-06)</b>
+                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</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=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/versioningCaching.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/versioningCaching.html Tue Sep  9 15:02:36 2014
@@ -96,16 +96,19 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/bestpractices.html"><strong>24</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>25</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/internals.html"><strong>25</strong><span>Wicket Internals</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>26</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -203,8 +206,7 @@ Stateless pages are never versioned and 
 			&#125;
 		&#125;);<p class="paragraph"/>	&#125;	
 &#125;</pre></div><p class="paragraph"/>Now if we run the new example (project LifeCycleStagesRevisited) and we click on the “Reload” button, a new page version is created and the page id is increased by one:<p class="paragraph"/><img border="0" class="center" src="../img/reload-page.png"></img><p class="paragraph"/>If we press the back button the page version previously rendered (and serialized) will be retrieved (i.e. deserialized) and it will be used again to respond to our request (and page id is decremented):<p class="paragraph"/><img border="0" class="center" src="../img/browser-back.png"></img><p class="paragraph"/><blockquote class="note">
-For more details about page storing you can visit the wiki page at https://cwiki.apache.org/confluence/display/WICKET/Page+Storage . 
-On this page you can find which classes are involved into page storing mechanism and how they work together.
+For more details about page storing you can take a look at paragraph "Page storing" from chapter "Wicket Internals". The content of this paragraph is from wiki page https://cwiki.apache.org/confluence/display/WICKET/Page+Storage. 
 </blockquote><p class="paragraph"/>As we have stated at the beginning of this chapter, page versions are stored using Java serialization, therefore every object referenced inside a page must be serializable. In paragraph 9.6 we will see how to overcome this limit and work with non-serializable objects in our components using detachable Wicket models.<p class="paragraph"/><h3>Using a specific page version with PageReference</h3><p class="paragraph"/>To retrieve a specific page version in our code we can use class <code>org.apache.wicket.PageReference</code> by providing its constructor with the corresponding page id:<p class="paragraph"/><div class="code"><pre>//load page version with page id = 3
 PageReference pageReference = <span class="java&#45;keyword">new</span> PageReference(3);
 //load the related page instance
@@ -291,7 +293,7 @@ Page '&#60;page class&#62;' is not state
 <div id="footer">
     
 Copyright &copy; 2013-2014 — <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a> 
-                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-06)</b>
+                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</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=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/whyLearn.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/whyLearn.html Tue Sep  9 15:02:36 2014
@@ -96,16 +96,19 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/bestpractices.html"><strong>24</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>25</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/internals.html"><strong>25</strong><span>Wicket Internals</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>26</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -244,7 +247,7 @@ Wicket is not the only component oriente
 <div id="footer">
     
 Copyright &copy; 2013-2014 — <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a> 
-                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-06)</b>
+                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</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=1623842&r1=1623841&r2=1623842&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/wicketstuff.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/wicketstuff.html Tue Sep  9 15:02:36 2014
@@ -2,7 +2,7 @@
                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-    <title>26 Project WicketStuff (Appendix) 6.x</title>
+    <title>27 Project WicketStuff (Appendix) 6.x</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
     <link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
@@ -96,16 +96,19 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/bestpractices.html"><strong>24</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>25</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/internals.html"><strong>25</strong><span>Wicket Internals</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>26</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/maven.html"><strong>26</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/wicketstuff.html"><strong>27</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>28</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/contributing.html"><strong>29</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -135,18 +138,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/maven.html">&lt;&lt; <strong>25</strong><span>Working with Maven (Appendix)</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/maven.html">&lt;&lt; <strong>26</strong><span>Working with Maven (Appendix)</span></a></div>
                 
 
                 <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
 
                 
-                    <div class="toc-item next-right"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>26 Project WicketStuff (Appendix) - Reference Documentation</h1>
+                    <h1>27 Project WicketStuff (Appendix) - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Martin Grigorov, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -159,22 +162,22 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_1"><strong>26.1</strong><span>What is project WicketStuff</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_1"><strong>27.1</strong><span>What is project WicketStuff</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_2"><strong>26.2</strong><span>Module tinymce</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_2"><strong>27.2</strong><span>Module tinymce</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_3"><strong>26.3</strong><span>Module wicketstuff-gmap3</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_3"><strong>27.3</strong><span>Module wicketstuff-gmap3</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_4"><strong>26.4</strong><span>Module wicketstuff-googlecharts</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_4"><strong>27.4</strong><span>Module wicketstuff-googlecharts</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_5"><strong>26.5</strong><span>Module wicketstuff-inmethod-grid</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_5"><strong>27.5</strong><span>Module wicketstuff-inmethod-grid</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_6"><strong>26.6</strong><span>Module wicketstuff-rest-annotations</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#wicketstuff_6"><strong>27.6</strong><span>Module wicketstuff-rest-annotations</span></a>
                     </div>
                     
                 </div>
@@ -182,11 +185,11 @@ function addJsClass() {
 
                 
 
-<h1 id="wicketstuff">26 Project WicketStuff (Appendix)</h1>
+<h1 id="wicketstuff">27 Project WicketStuff (Appendix)</h1>
 
 
 
-<h2 id="wicketstuff_1">26.1 What is project WicketStuff</h2>
+<h2 id="wicketstuff_1">27.1 What is project WicketStuff</h2>
 <p class="paragraph"/>WicketStuff is an umbrella project that gathers different Wicket-related projects developed and maintained by the community. The project is hosted on GitHub at <a href="https://github.com/wicketstuff/core." target="blank">https://github.com/wicketstuff/core</a> Every module is structured as a parent Maven project containing the actual project that implements the new functionality and an example project that illustrates how to use it in our code. The resulting directory structure of each module is the following:<p class="paragraph"/><div class="code"><pre>&#60;module name&#62;&#45;parent
         |
         +&#45;&#45;&#45;&#60;module name&#62;
@@ -195,7 +198,7 @@ Every WicketStuff module can be download
 </blockquote>
 
 
-<h2 id="wicketstuff_2">26.2 Module tinymce</h2>
+<h2 id="wicketstuff_2">27.2 Module tinymce</h2>
 <p class="paragraph"/>Module tinymce offers integration with the namesake JavaScript library that turns our “humble” text-areas into a full-featured HTML WYSIWYG editor:<p class="paragraph"/><img border="0" class="center" src="../img/tinymce.png"></img><p class="paragraph"/>To “tinyfy” a textarea component we must use behavior TinyMceBehavior:<p class="paragraph"/><div class="code"><pre>TextArea textArea = <span class="java&#45;keyword">new</span> TextArea(<span class="java&#45;quote">"textArea"</span>, <span class="java&#45;keyword">new</span> Model(<span class="java&#45;quote">""</span>));
 textArea.add(<span class="java&#45;keyword">new</span> TinyMceBehavior());</pre></div><p class="paragraph"/>By default TinyMceBehavior adds only a basic set of functionalities to our textarea:<p class="paragraph"/><img border="0" class="center" src="../img/tinymce_basic.png"></img><p class="paragraph"/>To add more functionalities we must use class TinyMCESettings to register additional TinyMCE plugins and to customize the toolbars buttons. The following code is an excerpt from example page FullFeaturedTinyMCEPage:<p class="paragraph"/><div class="code"><pre>TinyMCESettings settings = <span class="java&#45;keyword">new</span> TinyMCESettings(
                        TinyMCESettings.Theme.advanced);
@@ -223,7 +226,7 @@ textArea.add(<span class="java&#45;keywo
 
 
 
-<h2 id="wicketstuff_3">26.3 Module wicketstuff-gmap3</h2>
+<h2 id="wicketstuff_3">27.3 Module wicketstuff-gmap3</h2>
 <p class="paragraph"/>Module wicketstuff-gmap3 integrates <a href="http://maps.google.com" target="blank">Google Maps</a> service with Wicket providing component org.wicketstuff.gmap.GMap. If we want to embed Google Maps into one of our pages we just need to add component GMap inside the page. The following snippet is taken from example page SimplePage:<p class="paragraph"/><strong class="bold">HTML:</strong><p class="paragraph"/><div class="code"><pre>&#8230;
 &#60;body&#62;
   &#60;div wicket:id=<span class="java&#45;quote">"map"</span>&#62;Map&#60;/div&#62;
@@ -242,7 +245,7 @@ textArea.add(<span class="java&#45;keywo
 &#125;</pre></div><p class="paragraph"/>The component defines a number of setters to customize its behavior and appearance. More info can be found on wiki page <a href="https://github.com/wicketstuff/core/wiki/Gmap3" target="blank">https://github.com/wicketstuff/core/wiki/Gmap3</a> .
 
 
-<h2 id="wicketstuff_4">26.4 Module wicketstuff-googlecharts</h2>
+<h2 id="wicketstuff_4">27.4 Module wicketstuff-googlecharts</h2>
 <p class="paragraph"/>To integrate the <a href="https://developers.google.com/chart/" target="blank">Google Chart</a> tool into our pages we can use module wicketstuff-googlecharts. To display a chart we must combine the following entities: component Chart, interface IChartData and class ChartProvider, all inside package org.wicketstuff.googlecharts. The following snippet is taken from example page Home:<p class="paragraph"/><strong class="bold">HTML:</strong><p class="paragraph"/><div class="code"><pre>&#8230;
   &#60;h2&#62;Hello World&#60;/h2&#62;
   &#60;img wicket:id=<span class="java&#45;quote">"helloWorld"</span>/&#62;
@@ -255,7 +258,7 @@ provider.setPieLabels(<span class="java&
 add(<span class="java&#45;keyword">new</span> Chart(<span class="java&#45;quote">"helloWorld"</span>, provider));</pre></div><p class="paragraph"/><strong class="bold">Displayed chart:</strong><p class="paragraph"/><img border="0" class="center" src="../img/googlechart.png"></img><p class="paragraph"/>As we can see in the snippet above, component Chart must be used with &#60;img&#62; tag while the input data returned by IChartData must be a two-dimensional array of double values. 
 
 
-<h2 id="wicketstuff_5">26.5 Module wicketstuff-inmethod-grid</h2>
+<h2 id="wicketstuff_5">27.5 Module wicketstuff-inmethod-grid</h2>
 <p class="paragraph"/>Module wicketstuff-inmethod-grid implements a sophisticated grid-component with class com. inmethod.grid.datagrid.DataGrid.<p class="paragraph"/>Just like pageable repeaters (seen in paragraph 11.4) DataGrid provides data pagination and uses interface IDataProvider as data source. In addition the component is completely ajaxified:<p class="paragraph"/><img border="0" class="center" src="../img/inmethod-grid1.png"></img><p class="paragraph"/>DataGrid supports also editable cells and row selection:<p class="paragraph"/><img border="0" class="center" src="../img/inmethod-grid2.png"></img><p class="paragraph"/>The following snippet illustrate how to use DataGrid and is taken from wiki page <a href="https://github.com/wicketstuff/core/wiki/InMethodGrid" target="blank">https://github.com/wicketstuff/core/wiki/InMethodGrid</a> :<p class="paragraph"/><strong class="bold">HTML:</strong><p class="paragraph"/><div class="code"><pre>&#8230;
   &#60;div wicket:id=<span class="java&#45;quote">"grid"</span>&#62;Grid&#60;/div&#62;
 ...</pre></div><p class="paragraph"/><strong class="bold">Java code:</strong><p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">final</span> List&#60;Person&#62; personList = //load a list of Persons
@@ -267,7 +270,7 @@ List&#60;IGridColumn&#62; cols = (List) 
 add(grid);</pre></div><p class="paragraph"/>In the code above we have used convenience class DefaultDataGrid that is a subclass of DataGrid and it already comes with a navigation toolbar.<p class="paragraph"/>The example pages are under package com.inmethod.grid.examples.pages in the example project which is hosted at <a href="http://www.wicket-library.com/inmethod-grid/data-grid/simple" target="blank">http://www.wicket-library.com/inmethod-grid/data-grid/simple</a> .<p class="paragraph"/>
 
 
-<h2 id="wicketstuff_6">26.6 Module wicketstuff-rest-annotations</h2>
+<h2 id="wicketstuff_6">27.6 Module wicketstuff-rest-annotations</h2>
 REST-based API are becoming more and more popular around the web and the number of services based on this architecture is constantly increasing.<p class="paragraph"/>Wicket is well-known for its capability of transparently handling the state of web applications on server side, but it can be also easily adopted to create RESTful services.
 WicketStuff module for REST provides a special resource class and a set of annotations to implement REST APIs/services in much the same way as we do it with Spring MVC or with the standard JAX-RS.<p class="paragraph"/>The module provides class <code>AbstractRestResource</code> as generic abstract class to implement a Wicket resource that handles the request and the response using a particular data format (XML, JSON, etc...).
 Subclassing <code>AbstractRestResource</code> we can create custom resources and map their pubblic methods to a given subpath with annotation <code>MethodMapping</code>. The following snippet is taken from resource <code>PersonsRestResource</code> inside module <code>'restannotations-examples'</code>:<p class="paragraph"/><div class="code"><pre>@MethodMapping(<span class="java&#45;quote">"/persons"</span>)
@@ -297,9 +300,9 @@ To write/read objects to response/from r
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/maven.html">&lt;&lt; <strong>25</strong><span>Working with Maven (Appendix)</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/maven.html">&lt;&lt; <strong>26</strong><span>Working with Maven (Appendix)</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/redirects.html"><strong>27</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/redirects.html"><strong>28</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>
@@ -321,7 +324,7 @@ To write/read objects to response/from r
 <div id="footer">
     
 Copyright &copy; 2013-2014 — <a href="http://www.apache.org/" target="_blank">The Apache Software Foundation</a> 
-                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-06)</b>
+                      — <b style="color:#E8590A !important;">(Generated on: 2014-09-09)</b>
 
     
 </div>

Added: wicket/common/site/trunk/_site/guide/img/page-storage.png
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/img/page-storage.png?rev=1623842&view=auto
==============================================================================
Binary file - no diff available.

Propchange: wicket/common/site/trunk/_site/guide/img/page-storage.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream