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 2013/11/11 23:13:16 UTC

svn commit: r1540864 [3/38] - in /wicket/common/site/trunk/_site/guide: ./ gapi/ gapi/DefaultPackage/ gapi/spring/ guide/ guide/pages/ guide/src/docs/guide/ guide/src/docs/img/ guide/src/docs/imgOrigin/ img/

Modified: wicket/common/site/trunk/_site/guide/guide/chapter13.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/chapter13.html?rev=1540864&r1=1540863&r2=1540864&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/chapter13.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/chapter13.html Mon Nov 11 22:13:12 2013
@@ -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>13 Internationalization with Wicket 6.x</title>
+    <title>14 Internationalization with Wicket 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"/>
@@ -27,79 +27,82 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/chapter1.html"><strong>1</strong><span>Introduction</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>2</strong><span>Why should I learn Wicket?</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/howToSource.html"><strong>2</strong><span>How to use the example code</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>3</strong><span>Why should I learn Wicket?</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>4</strong><span>Wicket as page layout manager</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>5</strong><span>Keeping control over HTML</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>5</strong><span>Wicket as page layout manager</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>6</strong><span>Components lifecycle</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>6</strong><span>Keeping control over HTML</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>7</strong><span>Page versioning and caching</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>7</strong><span>Components lifecycle</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>8</strong><span>Under the hood of the request processing</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>8</strong><span>Page versioning and caching</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>9</strong><span>Wicket Links and URL generation</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>9</strong><span>Under the hood of the request processing</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>10</strong><span>Wicket models and forms</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>10</strong><span>Wicket Links and URL generation</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>11</strong><span>Wicket forms in detail</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>11</strong><span>Wicket models and forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>12</strong><span>Displaying multiple items with repeaters</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>12</strong><span>Wicket forms in detail</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>13</strong><span>Internationalization with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>13</strong><span>Displaying multiple items with repeaters</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>14</strong><span>Internationalization with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>17</strong><span>Working with AJAX</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>18</strong><span>Integration with enterprise containers</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>18</strong><span>Working with AJAX</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>19</strong><span>Security with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>19</strong><span>Integration with enterprise containers</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>20</strong><span>Security with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>23</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>24</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>24</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>25</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>25</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>26</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>26</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>27</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -129,18 +132,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter12.html">&lt;&lt; <strong>12</strong><span>Displaying multiple items with repeaters</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter12.html">&lt;&lt; <strong>13</strong><span>Displaying multiple items with repeaters</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/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>13 Internationalization with Wicket - Reference Documentation</h1>
+                    <h1>14 Internationalization with Wicket - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -153,22 +156,22 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_1"><strong>13.1</strong><span>Localization</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_1"><strong>14.1</strong><span>Localization</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_2"><strong>13.2</strong><span>Localization in Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_2"><strong>14.2</strong><span>Localization in Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_3"><strong>13.3</strong><span>Bundles lookup algorithm</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_3"><strong>14.3</strong><span>Bundles lookup algorithm</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_4"><strong>13.4</strong><span>Localization of component's choices</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_4"><strong>14.4</strong><span>Localization of component's choices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_5"><strong>13.5</strong><span>Internationalization and Models</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_5"><strong>14.5</strong><span>Internationalization and Models</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_6"><strong>13.6</strong><span>Summary</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter13_6"><strong>14.6</strong><span>Summary</span></a>
                     </div>
                     
                 </div>
@@ -176,11 +179,11 @@ function addJsClass() {
 
                 
 
-<h1 id="chapter13">13 Internationalization with Wicket</h1>
+<h1 id="chapter13">14 Internationalization with Wicket</h1>
 In chapter 10 we have seen how the topic of localization is involved in the generation of feedback messages and we had a first contact with resource bundles. In this chapter we will continue to explore the localization support provided by Wicket and we will learn how to build pages and components ready to be localized in different languages.
 
 
-<h2 id="chapter13_1">13.1 Localization</h2>
+<h2 id="chapter13_1">14.1 Localization</h2>
 <p class="paragraph"/>As we have seen in chapter 10, the infrastructure of feedback messages is built on top of Java internationalization (i18n) support, so it should not be surprising that the same infrastructure is used also for localization purpose. However, while so far we have used only the &#60;ApplicationClassName&#62;.properties file to store our custom messages, in this chapter we will see that also pages, components, validators and even Java packages can have their own resource bundles. This allows us to split bundles into multiple files keeping them close to where they are used. But before diving into the details of internationalization with Wicket, it's worthwhile to quickly review how i18n works under Java, see what classes are involved and how they are integrated into Wicket.<p class="paragraph"/><blockquote class="note">
 Providing a full description of Java support for i18n is clearly out of the scope of this document. If you need more informations about this topic you can find them in the JavaDocs and in the official <a href="http://docs.oracle.com/javase/tutorial/i18n/index.html" target="blank">i18n tutorial</a> .
 </blockquote><p class="paragraph"/><h3>Class Locale and ResourceBundle</h3><p class="paragraph"/>Class java.util.Locale represents a specific country or language of the world and is used in Java to retrieve other locale-dependent informations like numeric and date formats, the currency in use in a country and so on. Such kind of informations are accessed through special entities called resource bundles which are implemented by class java.util.ResourceBundle. Every resource bundle is identified by a full name which is built using four parameters: a base name (which is required), a language code, a country code and a variant (which are all optional). These three optional parameters are provided by an instance of Locale with its three corresponding getter methods: getLanguage(), getCountry() and getVariant(). Parameter language code is a lowercase ISO 639 2-letter code (like zh for Chinese, de for German and so on) while country code is an uppercase ISO 3166 2-letter code (like CN for 
 China, DE for Germany and so on). The final full name will have the following structure (NOTE: tokens inside squared brackets are optional):<p class="paragraph"/><div class="code"><pre>&#60;base name&#62;&#91; <em class="italic">&#60;language code&#62;&#91;</em> &#60;COUNTRY_CODE&#62;&#91;_&#60;variant code&#62;&#93;&#93;&#93;</pre></div><p class="paragraph"/>For example a bundle with MyBundle as base name and localized for Mandarin Chinese (language code zh, country code CH, variant cmn) will have MyBundle_zh_CH_cmn as full name. A base name can be a fully qualified class name, meaning that it can include a package name before the actual base name. The specified package will be the container of the given bundle. For example if we use org.foo.MyBundle as base name, the bundle named MyBundle will be searched inside package org.foo. The actual base name (MyBundle in our example) will be used to build the full name of the bundle following the same rules seen above.
@@ -193,7 +196,7 @@ ResourceBundle is an abstract factory cl
 </ol><p class="paragraph"/>The list of these candidate names is generated starting from the most specific one and subtracting an optional parameter at each step. The last name of the list corresponds to the default resource bundle which is the most general name and is equal to the base name. Once that getBundle has generated the list of candidate names, it will iterate over them to find the first one for which is possible to load a class or a properties file. The class must be a subclass of ResourceBundle having as class name the full name used in the current iteration. If such a class is not found, getBundle will try to locate a properties file having a file name equals to the current full name (Java will automatically append extension .properties to the full name). For example given the resource bundle of the previous example, Java will search first for class org.foo.MyBundle_zh_CH_cmn and then for file MyBundle_zh_CH_cmn.properties inside package org.foo. If no file is found for 
 any of the candidate names, a MissingResourceException will be thrown. Bundles contains local-dependent string resources identified by a key that is unique in the given bundle. So once we have obtained a valid bundle we can access these objects with method getString (String key).<p class="paragraph"/>As we have seen before working with feedback messages, in Wicket most of the times we will work with properties files rather than with bundle classes. In chapter 10 we used a properties file having as base name the class name of the application class and without any information about the locale. This file is the default resource bundle for a Wicket application. In paragraph 12.4 we will explore the algorithm used in Wicket to locate the available bundles for a given component. Once we have learnt how to leverage this algorithm, we will be able to split our bundles into more files organized in a logical hierarchy.
 
 
-<h2 id="chapter13_2">13.2 Localization in Wicket</h2>
+<h2 id="chapter13_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 &#117;7F51&#117;7AD9. 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://java.sun.com/dtd/properties.dtd" target="blank">http://java.sun.com/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://java.sun.com/dtd/properties.dtd"</span>&#62;
@@ -217,7 +220,7 @@ add(form.add(changeLocale))</pre></div><
 
 
 
-<h2 id="chapter13_3">13.3 Bundles lookup algorithm</h2>
+<h2 id="chapter13_3">14.3 Bundles lookup algorithm</h2>
 <p class="paragraph"/>As we hinted at the beginning of this chapter, by default Wicket provides a very flexible algorithm to locate the resource bundles available for a given component. In this paragraph we will learn how this default lookup algorithm works and which options it offers to manage our bundle files.<p class="paragraph"/><h3>Localizing pages and panels</h3><p class="paragraph"/>Similarly to application class, also component classes can have their own bundle files having as base name the class name of the related component and placed in the same package. So for example if class CustomPanel is a custom panel we created, we can provide it with a default bundle file called  CustomPanel.properties containing the textual resources used by this panel. This rule applies to page classes as well:<p class="paragraph"/><img border="0" class="center" src="../img/page-and-panel-bundle.png"></img><p class="paragraph"/>One fundamental thing to keep in mind when we work with these kinds 
 of bundles is that the lookup algorithm gives priority to the bundles of the containers of the component that is requesting a localized resource. The more a container is higher in the hierarchy, the bigger is its priority over the other components. This mechanism was made to allow containers to overwrite resources used by children components. As a consequence the values inside the resource bundle of a page will have the priority over the other values with the same key defined in the bundles of children components.<p class="paragraph"/>To better grasp this concept let's consider the component hierarchy depicted in the following picture:<p class="paragraph"/><img border="0" class="center" src="../img/custom-panel-bundle.png"></img><p class="paragraph"/>If CustomPanel tries to retrieve the string resource having 'message' as key, it will get the value 'Wellcome!' and not the one defined inside its own bundle file.<p class="paragraph"/>The default message-lookup algorithm is not limited
  to component hierarchy but it also includes the class hierarchy of every component visited in the search strategy described so far. This makes bundle files inheritable, just like markup files. When the hierarchy of a container component is explored, any ancestor has the priority over children components. Consider for example the hierarchy in the following picture:<p class="paragraph"/><img border="0" class="center" src="../img/custom-panel-bundle2.png"></img><p class="paragraph"/>Similarly to the previous example, the bundle owned by CustomPanel is overwritten by the bundle of   page class BasePage (which has been inherited by CustomPage).<p class="paragraph"/><h3>Component-specific resources</h3><p class="paragraph"/>In order to make a resource specific for a given child component, we can prefix the message key with the id of the desired component. Consider for example the following code and bundle of a generic page:<p class="paragraph"/>Page code:<p class="paragraph"/><div class=
 "code"><pre>add(<span class="java&#45;keyword">new</span> Label(<span class="java&#45;quote">"label"</span>,<span class="java&#45;keyword">new</span> ResourceModel(<span class="java&#45;quote">"labelValue"</span>)));
 add(<span class="java&#45;keyword">new</span> Label(<span class="java&#45;quote">"anotherLabel"</span>,<span class="java&#45;keyword">new</span> ResourceModel(<span class="java&#45;quote">"labelValue"</span>)));</pre></div><p class="paragraph"/>Page bundle:<p class="paragraph"/><div class="code"><pre>labelValue=Default value
 anotherLabel.labelValue=Value <span class="java&#45;keyword">for</span> anotherLabel</pre></div><p class="paragraph"/>Label with id anotherLabel will display the value 'Value for anotherLabel' while label label will display 'Default value'. In a similar fashion, parent containers can specify a resource for a nested child component prepending also its relative path (the path is dot-separated):<p class="paragraph"/>Page code:<p class="paragraph"/><div class="code"><pre>Form form = <span class="java&#45;keyword">new</span> Form(<span class="java&#45;quote">"form"</span>);
@@ -242,7 +245,7 @@ form.anotherLabel.labelValue=Value <span
 
 
 
-<h2 id="chapter13_4">13.4 Localization of component's choices</h2>
+<h2 id="chapter13_4">14.4 Localization of component's choices</h2>
 <p class="paragraph"/>Components that inherit from AbstractChoice (such as DropDownChoice, CheckBoxMultiple Choice and RadioChoice) must override method localizeDisplayValues and make it return true to localize the values displayed for their choices. By default this method return false so values are displayed as they are. Once localization is activated we can use display values as key for our localized string resources. In project LocalizedChoicesExample we have a drop-down list that displays four colors (green, red, blue, and yellow) which are localized in three languages (English, German and Italian). The current locale can be changed with another drop-down menu (in a similar fashion to project LocalizedGreetings). The code of the home page and the relative bundles are the following:<p class="paragraph"/>Java code:<p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">public</span> HomePage(<span class="java&#45;keyword">final</span> PageParameters parameters)
  &#123;
 	<span class="java&#45;keyword">super</span>(parameters);<p class="paragraph"/>	List&#60;Locale&#62; locales = Arrays.asList(Locale.ENGLISH, Locale.ITALIAN, Locale.GERMAN);
 	List&#60;<span class="java&#45;object">String</span>&#62; colors = Arrays.asList(<span class="java&#45;quote">"green"</span>, <span class="java&#45;quote">"red"</span>, <span class="java&#45;quote">"blue"</span>, <span class="java&#45;quote">"yellow"</span>);<p class="paragraph"/>	<span class="java&#45;keyword">final</span> DropDownChoice&#60;Locale&#62; changeLocale = <span class="java&#45;keyword">new</span> DropDownChoice&#60;Locale&#62;(<span class="java&#45;quote">"changeLocale"</span>, 
@@ -274,7 +277,7 @@ blue=Blu
 yellow=Giallo</pre></div><p class="paragraph"/>Along with the localized versions of colors names, in the bundles above we can also find a custom value for the placeholder text (“Chose one ”) used for null value. The resource key for this resource is 'null' or '&#60;component id&#62;.null' if we want to make it component-specific.
 
 
-<h2 id="chapter13_5">13.5 Internationalization and Models</h2>
+<h2 id="chapter13_5">14.5 Internationalization and Models</h2>
 <p class="paragraph"/>Internationalization is another good chance to taste the power of models. Wicket provides two built-in models to better integrate our components with string resources: they are ResourceModel and StringResourceModel.<p class="paragraph"/><h3>ResourceModel</h3><p class="paragraph"/>Model org.apache.wicket.model.ResourceModel acts just like the read-only model we have implemented in paragraph 12.3.4. It simply retrieves a string resource corresponding to a given key:<p class="paragraph"/><div class="code"><pre>//build a ResourceModel <span class="java&#45;keyword">for</span> key 'greetingMessage'
 <span class="java&#45;keyword">new</span> ResourceModel(<span class="java&#45;quote">"greetingMessage"</span>);</pre></div><p class="paragraph"/>We can also specify a default value to use if the requested resource is not found:<p class="paragraph"/><div class="code"><pre>//build a ResourceModel with a <span class="java&#45;keyword">default</span> value
 <span class="java&#45;keyword">new</span> ResourceModel(<span class="java&#45;quote">"notExistingResource"</span>, <span class="java&#45;quote">"Resource not found."</span>);</pre></div><p class="paragraph"/><h3>StringResourceModel</h3><p class="paragraph"/>Model org.apache.wicket.model.StringResourceModel allows to work with complex and dynamic string resources containing parameters and property expressions. The basic constructor of this model takes in input a resource key and another model. This further model can be used by both the key and the related resource to specify dynamic values with property expressions. For example let's say that we are working on an e-commerce site which has a page where users can see an overview of their orders. To handle the state of user's orders we will use the following bean and enum (the code is from project StringResourceModelExample):<p class="paragraph"/>Bean:<p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">public</sp
 an> class Order <span class="java&#45;keyword">implements</span> Serializable &#123;<p class="paragraph"/>	<span class="java&#45;keyword">private</span> Date orderDate;
@@ -298,16 +301,16 @@ add(<span class="java&#45;keyword">new</
 StringResourceModel srm = <span class="java&#45;keyword">new</span> StringResourceModel(<span class="java&#45;quote">"orderStatus.delay"</span>, <span class="java&#45;keyword">null</span>, propertyModel, 3);</pre></div><p class="paragraph"/>Bundle:<p class="paragraph"/><div class="code"><pre>orderStatus.delay=Your order submitted on $&#123;0&#125; has been delayed by &#123;1&#125; days.</pre></div><p class="paragraph"/>One further parameter we can specify when we build a StringResourceModel is the component that must be used by the lookup algorithm. Normally this parameter is not relevant, but if we need to use a particular bundle owned by a component not considered by the algorithm, we can specify this component as second parameter. If we pass all possible parameters to StringResourceModel's constructor we obtain something like this:<p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">new</span> StringResourceModel(<span class="java&#45;quote">"myKey"</span>,
  myComponent, myModel, param1, param2, param3,...);</pre></div>
 
 
-<h2 id="chapter13_6">13.6 Summary</h2>
+<h2 id="chapter13_6">14.6 Summary</h2>
 <p class="paragraph"/>Internationalization is a mandatory step if we want to take our applications (and our business!) abroad. Choosing the right strategy to manage our localized resources is fundamental to avoid to make a mess of them. In this chapter we have explored the built-in support for localization provided by Wicket, and we have learnt which solutions it offers to manage resource bundles. In the final part of the chapter we have seen how to localize the options displayed by a component (such as DropDownChoice or RadioChoice) and we also introduced two new models specifically designed to localize our components without introducing in their code any detail about internationalization.
 
 
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter12.html">&lt;&lt; <strong>12</strong><span>Displaying multiple items with repeaters</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter12.html">&lt;&lt; <strong>13</strong><span>Displaying multiple items with repeaters</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>

Modified: wicket/common/site/trunk/_site/guide/guide/chapter14.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/chapter14.html?rev=1540864&r1=1540863&r2=1540864&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/chapter14.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/chapter14.html Mon Nov 11 22:13:12 2013
@@ -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>14 Resource management with Wicket 6.x</title>
+    <title>15 Resource management with Wicket 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"/>
@@ -27,79 +27,82 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/chapter1.html"><strong>1</strong><span>Introduction</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>2</strong><span>Why should I learn Wicket?</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/howToSource.html"><strong>2</strong><span>How to use the example code</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>3</strong><span>Why should I learn Wicket?</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>4</strong><span>Wicket as page layout manager</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>5</strong><span>Keeping control over HTML</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>5</strong><span>Wicket as page layout manager</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>6</strong><span>Components lifecycle</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>6</strong><span>Keeping control over HTML</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>7</strong><span>Page versioning and caching</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>7</strong><span>Components lifecycle</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>8</strong><span>Under the hood of the request processing</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>8</strong><span>Page versioning and caching</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>9</strong><span>Wicket Links and URL generation</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>9</strong><span>Under the hood of the request processing</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>10</strong><span>Wicket models and forms</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>10</strong><span>Wicket Links and URL generation</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>11</strong><span>Wicket forms in detail</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>11</strong><span>Wicket models and forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>12</strong><span>Displaying multiple items with repeaters</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>12</strong><span>Wicket forms in detail</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>13</strong><span>Internationalization with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>13</strong><span>Displaying multiple items with repeaters</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>14</strong><span>Internationalization with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>17</strong><span>Working with AJAX</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>18</strong><span>Integration with enterprise containers</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>18</strong><span>Working with AJAX</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>19</strong><span>Security with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>19</strong><span>Integration with enterprise containers</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>20</strong><span>Security with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>23</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>24</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>24</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>25</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>25</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>26</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>26</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>27</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -129,18 +132,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter13.html">&lt;&lt; <strong>13</strong><span>Internationalization with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter13.html">&lt;&lt; <strong>14</strong><span>Internationalization with Wicket</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/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>14 Resource management with Wicket - Reference Documentation</h1>
+                    <h1>15 Resource management with Wicket - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -153,34 +156,34 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_1"><strong>14.1</strong><span>Static vs dynamic resources</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_1"><strong>15.1</strong><span>Static vs dynamic resources</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_2"><strong>14.2</strong><span>Resource references</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_2"><strong>15.2</strong><span>Resource references</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_3"><strong>14.3</strong><span>Package resources</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_3"><strong>15.3</strong><span>Package resources</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_4"><strong>14.4</strong><span>Adding resources to page header section</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_4"><strong>15.4</strong><span>Adding resources to page header section</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_5"><strong>14.5</strong><span>Resource dependencies</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_5"><strong>15.5</strong><span>Resource dependencies</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_6"><strong>14.6</strong><span>Custom resources</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_6"><strong>15.6</strong><span>Custom resources</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_7"><strong>14.7</strong><span>Mounting resources</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_7"><strong>15.7</strong><span>Mounting resources</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_8"><strong>14.8</strong><span>Shared resources</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_8"><strong>15.8</strong><span>Shared resources</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_9"><strong>14.9</strong><span>Customizing resource loading</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_9"><strong>15.9</strong><span>Customizing resource loading</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_10"><strong>14.10</strong><span>Summary</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter14_10"><strong>15.10</strong><span>Summary</span></a>
                     </div>
                     
                 </div>
@@ -188,19 +191,19 @@ function addJsClass() {
 
                 
 
-<h1 id="chapter14">14 Resource management with Wicket</h1>
+<h1 id="chapter14">15 Resource management with Wicket</h1>
 One of the biggest challenge for a web framework is to offer an efficient and consistent mechanism to handle internal resources such as CSS/JavaScript files, picture files, pdf and so on. Resources can be static (like an icon used across the site) or dynamic (they can be generated on the fly) and they can be made available to users as a download or as a simple URL.<p class="paragraph"/>In paragraph 4.6 we have already seen how to add CSS and JavaScript contents to the header section of the page. In the first half of this chapter we will learn a more sophisticated technique that allows us to manage static resources directly from code and “pack” them with our custom components.<p class="paragraph"/>Then, in the second part of the chapter we will see how to implement custom resources to enrich our web application with more complex and dynamic functionalities.
 
 
-<h2 id="chapter14_1">14.1 Static vs dynamic resources</h2>
+<h2 id="chapter14_1">15.1 Static vs dynamic resources</h2>
 <p class="paragraph"/>In Wicket a resource is an entity that can interact with the current request and response and It must implement interface org.apache.wicket.request.resource.IResource. This interface defines just method respond(IResource.Attributes attributes) where the nested class IResource. Attributes provides access to request, response and page parameters objects.<p class="paragraph"/>Resources can be static or dynamic. Static resources don't entail any computational effort to be generated and they generally correspond to a resource on the filesystem. On the contrary dynamic resources are generated on the fly when they are requested, following a specific logic coded inside them.<p class="paragraph"/>An example of dynamic resource is the built-in class CaptchaImageResource in package org. apache.wicket.extensions.markup.html.captcha which generates a captcha image each time is rendered.<p class="paragraph"/>As we will see in paragraph 13.6, developers can build custom resou
 rces extending base class org.apache.wicket.request.resource.AbstractResource.
 
 
-<h2 id="chapter14_2">14.2 Resource references</h2>
+<h2 id="chapter14_2">15.2 Resource references</h2>
 <p class="paragraph"/>Most of the times in Wicket we won't directly instantiate a resource but rather we will use a reference to it. Resource references are represented by abstract class org.apache.wicket.request.resource .ResourceReference which returns a concrete resource with factory method getResource(). In this way we can lazy-initialize resources loading them only the first time they are requested.
 
 
-<h2 id="chapter14_3">14.3 Package resources</h2>
+<h2 id="chapter14_3">15.3 Package resources</h2>
 <p class="paragraph"/>With HTML we use to include static resources in our pages using tags like &#60;script&#62;, &#60;link&#62; or &#60;img&#62;. This is what we have done so far writing our custom panels and pages. However, when we work with a component-oriented framework like Wicket, this classic approach becomes inadequate because it makes custom components hardly reusable. This happens when a component depends on a big number of resources. In such a case, if somebody wanted to use our custom component in his application, he would be forced to know which resources it depends on and make them available.<p class="paragraph"/>To solve this problem Wicket allows us to place static resource files into component package (like we do with markup and properties files) and load them from component code.<p class="paragraph"/>These kinds of resources are called package resources (a CSS and a JavaScript file in this screenshot):<p class="paragraph"/><img border="0" class="center" src="../img
 /package-resources.png"></img><p class="paragraph"/>With package resources custom components become independent and self-contained and client code can use them without worrying about their dependencies.<p class="paragraph"/>To load package resources Wicket provides class org.apache.wicket.request.resource. PackageResourceReference.<p class="paragraph"/>To identify a package resource we need to specify a class inside the target package and the name of the desired resource (most of the times this will be a file name).<p class="paragraph"/>In the following example taken from project ImageAsPackageRes, CustomPanel loads a picture file available as package resource and it displays it in a &#60;img&#62; tag using the built-in component org. apache.wicket.markup.html.image.Image:<p class="paragraph"/><strong class="bold">HTML:</strong>
 <div class="code"><pre>&#60;html&#62;
 &#60;head&#62;...&#60;/head&#62;
@@ -225,7 +228,7 @@ Package resources can be localized follo
 
 
 
-<h2 id="chapter14_4">14.4 Adding resources to page header section</h2>
+<h2 id="chapter14_4">15.4 Adding resources to page header section</h2>
 <p class="paragraph"/>Wicket comes with interface org.apache.wicket.markup.html.IHeaderContributor which allows components and behaviors (which will be introduced later in paragraph 15.1) to contribute to the header section of their page. The only method defined in this interface is renderHead (IHeaderResponse response) where IHeaderResponse is an interface which defines method render(HeaderItem item) to write static resources or free-form text into the header section of the page.<p class="paragraph"/>Header entries are instances of abstract class org.apache.wicket.markup.head.HeaderItem. Wicket provides a set of built-in implementations of this class suited for the most common types of resources. With the exception of PriorityHeaderItem, every implementation of HeaderItem is an abstract factory class:
 <ul class="star">
 <li><strong class="bold">CssHeaderItem:</strong> represents a CSS resource. Factory methods provided by this class are forReference which takes in input a resource reference, forUrl which creates an CSS item from a given URL and forCSS which takes in input an arbitrary CSS string and an optional id value to identify the resource.</li>
@@ -245,7 +248,7 @@ Package resources can be localized follo
 
 
 
-<h2 id="chapter14_5">14.5 Resource dependencies</h2>
+<h2 id="chapter14_5">15.5 Resource dependencies</h2>
 <p class="paragraph"/>Class ResourceReference allows to specify the resources it depends on overriding method getDependencies(). The method returns an iterator over the set of HeaderItems that must be rendered before the resource referenced by ResourceReference can be used. This can be really helpful when our resources are JavaScript or CSS libraries that in turn depend on other libraries.<p class="paragraph"/>For example we can use this method to ensure that a custom reference to JQueryUI library will find JQuery already loaded in the page:<p class="paragraph"/><div class="code"><pre>Url jqueyuiUrl = Url.parse(<span class="java&#45;quote">"https://ajax.googleapis.com/ajax/libs/jqueryui/"</span> + 
                                                                  <span class="java&#45;quote">"1.10.2/jquery&#45;ui.min.js"</span>);<p class="paragraph"/>UrlResourceReference jqueryuiRef = <span class="java&#45;keyword">new</span> UrlResourceReference(jqueyuiUrl)&#123;
 	@Override
@@ -257,7 +260,7 @@ Package resources can be localized follo
 &#125;;</pre></div><p class="paragraph"/>Please note that in the code above we have built a resource reference using a URL to the desired library instead of a package resource holding the physical file.<p class="paragraph"/>The same method getDependencies() is defined also for class HeaderItem.
 
 
-<h2 id="chapter14_6">14.6 Custom resources</h2>
+<h2 id="chapter14_6">15.6 Custom resources</h2>
 <p class="paragraph"/>In Wicket the best way to add dynamic functionalities to our application (such as csv export, a pdf generated on the fly, etc...) is implementing a custom resource. In this paragraph as example of custom resource we will build a basic RSS feeds generator which can be used to publish feeds on our site (project CustomResourceMounting). Instead of generating a RSS feed by hand we will use Rome framework and its utility classes.<p class="paragraph"/>As hinted above in paragraph 13.1, class AbstractResource can be used as base class to implement new resources. This class defines abstract method newResourceResponse which is invoked when the resource is requested. The following is the code of our RSS feeds generator:<p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">public</span> class RSSProducerResource <span class="java&#45;keyword">extends</span> AbstractResource &#123;<p class="paragraph"/>  @Override
   <span class="java&#45;keyword">protected</span> ResourceResponse newResourceResponse(Attributes attributes) &#123;
     ResourceResponse resourceResponse = <span class="java&#45;keyword">new</span> ResourceResponse();
@@ -282,7 +285,7 @@ Package resources can be localized follo
 &#125;</pre></div><p class="paragraph"/>Method newResourceResponse returns an instance of ResourceResponse representing the response generated by the custom resource. Since RSS feeds are based on XML, in the code above we have set the type of the response to text/xml and the text encoding to utf-8.<p class="paragraph"/>To specify the content that will be returned by our resource we must also provide an implementation of inner class WriteCallback which is responsible for writing content data to response's output stream. In our project we used class SyndFeedOutput from Rome framework to write our feed to response. Method getFeed() is just an utility method that generates a sample RSS feed (which is an instance of interface com.sun.syndication.feed.synd.SyndFeed).<p class="paragraph"/>Now that we have our custom resource in place, we can use it in the home page of the project. The easiest way to make a resource available to users is to expose it with link component ResourceLink:<p clas
 s="paragraph"/><div class="code"><pre>add(<span class="java&#45;keyword">new</span> ResourceLink(<span class="java&#45;quote">"rssLink"</span>, <span class="java&#45;keyword">new</span> RSSProducerResource()));</pre></div><p class="paragraph"/>In the next paragraphs we will see how to register a resource at application-level and how to mount it to an arbitrary URL.
 
 
-<h2 id="chapter14_7">14.7 Mounting resources</h2>
+<h2 id="chapter14_7">15.7 Mounting resources</h2>
 <p class="paragraph"/>Just like pages also resources can be mounted to a specific path. Class WebApplication provides method mountResource which is almost identical to mountPage seen in paragraph 8.6.1:<p class="paragraph"/><div class="code"><pre>@Override
 <span class="java&#45;keyword">public</span> void init() &#123;
   <span class="java&#45;keyword">super</span>.init();
@@ -308,7 +311,7 @@ Package resources can be localized follo
 &#125;</pre></div>
 
 
-<h2 id="chapter14_8">14.8 Shared resources</h2>
+<h2 id="chapter14_8">15.8 Shared resources</h2>
 <p class="paragraph"/>Resources can be added to a global registry in order to share them at application-level. Shared resources are identified by an application-scoped key and they can be easily retrieved at a later time using reference class SharedResourceReference. The global registry can be accessed with Application's method getSharedResources. In the following excerpt of code (taken again from project CustomResourceMounting) we register an instance of our custom RSS feeds producer as application-shared resource:<p class="paragraph"/><div class="code"><pre>//init application's method
   @Override
   <span class="java&#45;keyword">public</span> void init()&#123;
@@ -322,7 +325,7 @@ Remember that we can get the URL of a re
 </blockquote>
 
 
-<h2 id="chapter14_9">14.9 Customizing resource loading</h2>
+<h2 id="chapter14_9">15.9 Customizing resource loading</h2>
 <p class="paragraph"/>Wicket loads application's resources delegating this task to a resource locator represented by interface org.apache.wicket.core.util.resource.locator.IResourceStreamLocator. To retrieve or modify the current resource locator we can use the getter and setter methods defined by setting interface IResourceSettings:<p class="paragraph"/><div class="code"><pre>//init application's method
   @Override
   <span class="java&#45;keyword">public</span> void init()&#123;   
@@ -340,15 +343,15 @@ By default, if resource files can not be
 </blockquote>
 
 
-<h2 id="chapter14_10">14.10 Summary</h2>
+<h2 id="chapter14_10">15.10 Summary</h2>
 <p class="paragraph"/>In this chapter we have learnt how to manage resources with the built-in mechanism provided by Wicket. With this mechanism we handle resources from Java code and Wicket will automatically take care of generating a valid URL for them. We have also seen how resources can be bundled as package resources with a component that depends on them to make it self-contained.<p class="paragraph"/>Then, in the second part of the chapter, we have built a custom resource and we have learnt how to mount it to an arbitrary URL and how to make it globally available as shared resource.<p class="paragraph"/>Finally, in the last part of the paragraph we took a peek at the mechanism provided by the framework to customize the locations where the resource-lookup algorithm searches for resources.
 
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter13.html">&lt;&lt; <strong>13</strong><span>Internationalization with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter13.html">&lt;&lt; <strong>14</strong><span>Internationalization with Wicket</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>

Modified: wicket/common/site/trunk/_site/guide/guide/chapter15.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/chapter15.html?rev=1540864&r1=1540863&r2=1540864&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/chapter15.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/chapter15.html Mon Nov 11 22:13:12 2013
@@ -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>15 An example of integration with JavaScript 6.x</title>
+    <title>16 An example of integration with JavaScript 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"/>
@@ -27,79 +27,82 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/chapter1.html"><strong>1</strong><span>Introduction</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>2</strong><span>Why should I learn Wicket?</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/howToSource.html"><strong>2</strong><span>How to use the example code</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>3</strong><span>Why should I learn Wicket?</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>4</strong><span>Wicket as page layout manager</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>5</strong><span>Keeping control over HTML</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>5</strong><span>Wicket as page layout manager</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>6</strong><span>Components lifecycle</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>6</strong><span>Keeping control over HTML</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>7</strong><span>Page versioning and caching</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>7</strong><span>Components lifecycle</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>8</strong><span>Under the hood of the request processing</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>8</strong><span>Page versioning and caching</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>9</strong><span>Wicket Links and URL generation</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>9</strong><span>Under the hood of the request processing</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>10</strong><span>Wicket models and forms</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>10</strong><span>Wicket Links and URL generation</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>11</strong><span>Wicket forms in detail</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>11</strong><span>Wicket models and forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>12</strong><span>Displaying multiple items with repeaters</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>12</strong><span>Wicket forms in detail</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>13</strong><span>Internationalization with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>13</strong><span>Displaying multiple items with repeaters</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>14</strong><span>Internationalization with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>17</strong><span>Working with AJAX</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>18</strong><span>Integration with enterprise containers</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>18</strong><span>Working with AJAX</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>19</strong><span>Security with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>19</strong><span>Integration with enterprise containers</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>20</strong><span>Security with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>23</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>24</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>24</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>25</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>25</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>26</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>26</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>27</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -129,18 +132,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter14.html">&lt;&lt; <strong>14</strong><span>Resource management with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter14.html">&lt;&lt; <strong>15</strong><span>Resource management with Wicket</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/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>15 An example of integration with JavaScript - Reference Documentation</h1>
+                    <h1>16 An example of integration with JavaScript - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -153,13 +156,13 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter15_1"><strong>15.1</strong><span>What we want to do...</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter15_1"><strong>16.1</strong><span>What we want to do...</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter15_2"><strong>15.2</strong><span>...and how we will do it</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter15_2"><strong>16.2</strong><span>...and how we will do it</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter15_3"><strong>15.3</strong><span>Summary</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter15_3"><strong>16.3</strong><span>Summary</span></a>
                     </div>
                     
                 </div>
@@ -167,11 +170,11 @@ function addJsClass() {
 
                 
 
-<h1 id="chapter15">15 An example of integration with JavaScript</h1>
+<h1 id="chapter15">16 An example of integration with JavaScript</h1>
 It's time to put into practice what we have learnt so far in this guide. To do this we will build a custom date component consisting of a text field to edit a date value and a fancy calendar icon to open a JavaScript datepicker. This chapter will also illustrate an example of integration of Wicket with a JavaScript library like <a href="http://jquery.com/" target="blank">JQuery</a> and its child project <a href="http://jqueryui.com/" target="blank">JQuery UI</a> .
 
 
-<h2 id="chapter15_1">15.1 What we want to do...</h2>
+<h2 id="chapter15_1">16.1 What we want to do...</h2>
 <p class="paragraph"/>For end-users a datepicker is one of the most appreciated widget. It allows to simply edit a date value with the help of a user-friendly pop-up calendar. That's why nearly all UI frameworks provide a version of this widget.<p class="paragraph"/>Popular JavaScript libraries like YUI and JQuery come with a ready-to-use datepicker to enrich the user experience of our web applications. Wicket already provides a component which integrates a text field with a calendar widget from YUI library, but there is no built-in component that uses a datepicker based on JQuery library.<p class="paragraph"/>As both JQuery and its child project JQueryUI have gained a huge popularity in the last years, it's quite interesting to see how to integrate them in Wicket building a custom component. In this chapter we will create a custom datepicker based on the corresponding widget from JQueryUI project:<p class="paragraph"/><img border="0" class="center" src="../img/datepicker-screenshot
 .png"></img><p class="paragraph"/><blockquote class="warning">
 On Internet you can find different libraries that already offer a strong integration between Wicket and JQuery. The goal of this chapter is to see how to integrate Wicket with a JavaScript framework building a simple homemade datepicker which is not intended to provide every feature of the original JavaScript widget.
 </blockquote><p class="paragraph"/><h3>What features we want to implement</h3><p class="paragraph"/>Before starting to write code, we must clearly define what features we want to implement for our component. The new component should:
@@ -182,7 +185,7 @@ On Internet you can find different libra
 </ul><p class="paragraph"/>That's what we'd like to have with our custom datepicker. In the rest of the chapter we will see how to implement the features listed above and which resources must be packaged with our component.
 
 
-<h2 id="chapter15_2">15.2 ...and how we will do it</h2>
+<h2 id="chapter15_2">16.2 ...and how we will do it</h2>
 <p class="paragraph"/>Our new component will extend the a built-in text field org.apache.wicket.extensions .markup.html.form.DateTextField which already uses a java.util.Date as model object and already performs conversion and validation for input values. Since the component must be self-contained, we must ensure that the JavaScript libraries it relies on (JQuery and JQuery UI) will be always available.<p class="paragraph"/>Starting from version 6.0 Wicket has adopted JQuery as backing JavaScript library so we can use the  version bundled with Wicket for our custom datepicker.<p class="paragraph"/>To make JQuery UI available we should instead go to its official site, download the required artifacts and use them as package resources of our component.<p class="paragraph"/><h3>Component package resources</h3><p class="paragraph"/>JQuery UI needs the following static resources in order to work properly:
 <ul class="star">
 <li><strong class="bold">jquery-ui.min.js</strong>: the minified version of the library.</li>
@@ -248,15 +251,15 @@ Our datepicker is not ready yet to be us
 </blockquote>
 
 
-<h2 id="chapter15_3">15.3 Summary</h2>
+<h2 id="chapter15_3">16.3 Summary</h2>
 <p class="paragraph"/>In this brief chapter we have seen how custom components can be integrated with <a href="http://en.wikipedia.org/wiki/Dynamic_HTM" target="blank">DHTML</a> technologies. To do so we have used most of what we have learnt in this guide. Now we are able to build complex components with a rich user experience. However this is not enough yet to develop <a href="http://en.wikipedia.org/wiki/Web_2.0" target="blank">Web 2.0</a> applications. We still have to cover a fundamental technology like AJAX and some other Wicket-related topics that will help us building our application in more modular and efficient way.<p class="paragraph"/><p class="paragraph"/>
 
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter14.html">&lt;&lt; <strong>14</strong><span>Resource management with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter14.html">&lt;&lt; <strong>15</strong><span>Resource management with Wicket</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>