Modified: wicket/common/site/trunk/_site/learn/examples/navomatic.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/learn/examples/navomatic.html?rev=1085437&r1=1085436&r2=1085437&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/learn/examples/navomatic.html (original)
+++ wicket/common/site/trunk/_site/learn/examples/navomatic.html Fri Mar 25 
16:00:25 2011
@@ -171,148 +171,37 @@
 <p>For example, here is markup for a simple Border subclass, a usage of that 
border, and the markup which would be output on rendering:</p>
 
 <h3 id='border_markup'>Border markup</h3>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;body&gt;</span>
-    <span class='nt'>&lt;wicket:border&gt;</span>
-        First <span class='nt'>&lt;wicket:body/&gt;</span> Last
-    <span class='nt'>&lt;/wicket:border&gt;</span>
-<span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
+
 <h3 id='border_usage'>Border usage</h3>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;body&gt;</span>
-  <span class='nt'>&lt;span</span> <span class='na'>wicket:id =</span><span 
class='err'> </span><span class='s'>&quot;myBorder&quot;</span><span 
class='nt'>&gt;</span>
-      Middle
-  <span class='nt'>&lt;/span&gt;</span>
-<span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
+
 <h3 id='rendered_markup'>Rendered markup</h3>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;body&gt;</span>
-      First Middle Last
-<span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
+
 <p>In other words, the markup around the <code>&lt;wicket:body/&gt;</code> tag 
in the border component is sort of &#8220;wrapped around&#8221; the body of the 
<code>&lt;span&gt;</code> tag where the border is used. This seems simple in 
this example, but keep in mind that nested components and even nested borders 
can appear anywhere in either markup file. This can be used to create quite 
complex effects with relatively little code.</p>
 
 <h3 id='navomaticapplicationjava'>NavomaticApplication.java</h3>
 
 <p>Just as in the Hello World! example, we need to define our application. In 
this case, we set Page1 to be our home page.</p>
-<div class='highlight'><pre><code class='java'><span class='kn'>package</span> 
<span class='n'>org</span><span class='o'>.</span><span 
class='na'>apache</span><span class='o'>.</span><span 
class='na'>wicket</span><span class='o'>.</span><span 
class='na'>examples</span><span class='o'>.</span><span 
class='na'>navomatic</span><span class='o'>;</span>
 
-<span class='kn'>import</span> <span 
class='nn'>org.apache.wicket.protocol.http.WebApplication</span><span 
class='o'>;</span>
-
-<span class='kd'>public</span> <span class='kd'>class</span> <span 
class='nc'>NavomaticApplication</span> <span class='kd'>extends</span> <span 
class='n'>WebApplication</span> <span class='o'>{</span>
-    <span class='kd'>public</span> <span 
class='nf'>NavomaticApplication</span><span class='o'>()</span> <span 
class='o'>{</span>
-    <span class='o'>}</span>
-   
-    <span class='kd'>public</span> <span class='n'>Class</span> <span 
class='nf'>getHomePage</span><span class='o'>()</span> <span class='o'>{</span>
-        <span class='k'>return</span> <span class='n'>Page1</span><span 
class='o'>.</span><span class='na'>class</span><span class='o'>;</span>
-    <span class='o'>}</span>
-<span class='o'>}</span>
-</code></pre>
-</div>
 <h3 id='page1java'>Page1.java</h3>
 
 <p>The Page1 Java and HTML files look like this:</p>
-<div class='highlight'><pre><code class='java'><span class='kn'>package</span> 
<span class='n'>wicket</span><span class='o'>.</span><span 
class='na'>examples</span><span class='o'>.</span><span 
class='na'>navomatic</span><span class='o'>;</span>
-
-<span class='kn'>import</span> <span 
class='nn'>org.apache.wicket.markup.html.WebPage</span><span class='o'>;</span>
 
-<span class='kd'>public</span> <span class='kd'>class</span> <span 
class='nc'>Page1</span> <span class='kd'>extends</span> <span 
class='n'>WebPage</span> <span class='o'>{</span>
-    <span class='kd'>public</span> <span class='nf'>Page1</span><span 
class='o'>()</span> <span class='o'>{</span>
-        <span class='n'>add</span><span class='o'>(</span><span 
class='k'>new</span> <span class='n'>NavomaticBorder</span><span 
class='o'>(</span><span class='s'>&quot;navomaticBorder&quot;</span><span 
class='o'>));</span>
-    <span class='o'>}</span>
-<span class='o'>}</span>
-</code></pre>
-</div>
 <h3 id='page1html'>Page1.html</h3>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;body&gt;</span> 
-    <span class='nt'>&lt;span</span> <span class='na'>wicket:id =</span><span 
class='err'> </span><span class='s'>&quot;navomaticBorder&quot;</span><span 
class='nt'>&gt;</span>
-        You are viewing Page1
-    <span class='nt'>&lt;/span&gt;</span>
-<span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
+
 <p>Notice that the NavomaticBorder component is attached to the 
<code>&lt;span&gt;</code> tag because the name of the component in the Java 
code is &#8220;navomaticBorder&#8221; and the <code>&lt;span&gt;</code> 
tag&#8217;s wicket:id attribute is set to &#8220;navomaticBorder&#8221;. 
Because the two names match, Wicket associates the NavomaticBorder Java 
component with the <code>&lt;span&gt;</code> tag.</p>
 
 <h3 id='page2java'>Page2.java</h3>
 
 <p>The Page2 Java and HTML files look almost identical (and we&#8217;ll omit 
the sources for Page3 altogether because it follows the same pattern):</p>
-<div class='highlight'><pre><code class='java'><span class='kd'>public</span> 
<span class='kd'>class</span> <span class='nc'>Page2</span> <span 
class='kd'>extends</span> <span class='n'>WebPage</span> <span 
class='o'>{</span>
-    <span class='kd'>public</span> <span class='nf'>Page2</span><span 
class='o'>()</span> <span class='o'>{</span>
-        <span class='n'>add</span><span class='o'>(</span><span 
class='k'>new</span> <span class='n'>NavomaticBorder</span><span 
class='o'>(</span><span class='s'>&quot;navomaticBorder&quot;</span><span 
class='o'>));</span>
-    <span class='o'>}</span>
-<span class='o'>}</span>
-</code></pre>
-</div>
+
 <h3 id='page2html'>Page2.html</h3>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;body&gt;</span>
-    <span class='nt'>&lt;span</span> <span class='na'>wicket:id =</span><span 
class='err'> </span><span class='s'>&quot;navomaticBorder&quot;</span><span 
class='nt'>&gt;</span>
-        You are viewing Page2
-    <span class='nt'>&lt;/span&gt;</span>
-<span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
+
 <h3 id='navomaticborderjava'>NavomaticBorder.java</h3>
 
 <p>So how does NavomaticBorder work? Glad you asked. The Java code below 
simply adds the two BoxBorder components you see. These components are nested 
borders which each draw a thin black line around their contents. The rest of 
the magic is in the NavomaticBorder markup.</p>
-<div class='highlight'><pre><code class='java'><span class='kn'>package</span> 
<span class='n'>wicket</span><span class='o'>.</span><span 
class='na'>examples</span><span class='o'>.</span><span 
class='na'>navomatic</span><span class='o'>;</span>
 
-<span class='kn'>import</span> <span 
class='nn'>org.apache.wicket.markup.html.border.Border</span><span 
class='o'>;</span>
-<span class='kn'>import</span> <span 
class='nn'>org.apache.wicket.markup.html.border.BoxBorder</span><span 
class='o'>;</span>
-
-<span class='kd'>public</span> <span class='kd'>class</span> <span 
class='nc'>NavomaticBorder</span> <span class='kd'>extends</span> <span 
class='n'>Border</span> <span class='o'>{</span>
-    <span class='kd'>public</span> <span 
class='nf'>NavomaticBorder</span><span class='o'>(</span><span 
class='kd'>final</span> <span class='n'>String</span> <span 
class='n'>componentName</span><span class='o'>)</span> <span class='o'>{</span>
-        <span class='kd'>super</span><span class='o'>(</span><span 
class='n'>componentName</span><span class='o'>);</span>
-
-        <span class='n'>add</span><span class='o'>(</span><span 
class='k'>new</span> <span class='n'>BoxBorder</span><span 
class='o'>(</span><span class='s'>&quot;navigationBorder&quot;</span><span 
class='o'>));</span>
-        <span class='n'>add</span><span class='o'>(</span><span 
class='k'>new</span> <span class='n'>BoxBorder</span><span 
class='o'>(</span><span class='s'>&quot;bodyBorder&quot;</span><span 
class='o'>));</span>
-    <span class='o'>}</span>
-<span class='o'>}</span>
-</code></pre>
-</div>
 <h3 id='navomaticborderhtml'>NavomaticBorder.html</h3>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;body&gt;</span>
-    <span class='nt'>&lt;wicket:border&gt;</span> 
-        <span class='nt'>&lt;p&gt;</span>
-        <span class='nt'>&lt;table&gt;</span>
-            <span class='nt'>&lt;tr&gt;</span>
-                <span class='nt'>&lt;td&gt;</span>
-                    <span class='nt'>&lt;span</span> <span 
class='na'>wicket:id =</span><span class='err'> </span><span 
class='s'>&quot;navigationBorder&quot;</span><span class='nt'>&gt;</span>
-                      <span class='nt'>&lt;b&gt;</span>Navigation Links<span 
class='nt'>&lt;/b&gt;</span>
-                      <span class='nt'>&lt;p&gt;</span>
-                        <span class='nt'>&lt;wicket:link&gt;</span>
-                          <span class='nt'>&lt;a</span> <span class='na'>href 
=</span><span class='err'> </span><span 
class='s'>&quot;Page1.html&quot;</span><span class='nt'>&gt;</span>Page1<span 
class='nt'>&lt;/a&gt;&lt;br/&gt;</span>
-                          <span class='nt'>&lt;a</span> <span class='na'>href 
=</span><span class='err'> </span><span 
class='s'>&quot;Page2.html&quot;</span><span class='nt'>&gt;</span>Page2<span 
class='nt'>&lt;/a&gt;&lt;br/&gt;</span>
-                          <span class='nt'>&lt;a</span> <span class='na'>href 
=</span><span class='err'> </span><span 
class='s'>&quot;Page3.html&quot;</span><span class='nt'>&gt;</span>Page3<span 
class='nt'>&lt;/a&gt;</span>
-                        <span class='nt'>&lt;/wicket:link&gt;</span>
-                      <span class='nt'>&lt;/p&gt;</span>
-                    <span class='nt'>&lt;/span&gt;</span>
-                <span class='nt'>&lt;/td&gt;</span>
-                <span class='nt'>&lt;td&gt;</span>
-                    <span class='nt'>&lt;span</span> <span 
class='na'>wicket:id =</span><span class='err'> </span><span 
class='s'>&quot;bodyBorder&quot;</span><span class='nt'>&gt;</span>
-                        <span class='nt'>&lt;wicket:body/&gt;</span>
-                    <span class='nt'>&lt;/span&gt;</span>
-                <span class='nt'>&lt;/td&gt;</span>
-            <span class='nt'>&lt;/tr&gt;</span>
-        <span class='nt'>&lt;/table&gt;</span>
-        <span class='nt'>&lt;/p&gt;</span>
-    <span class='nt'>&lt;/wicket:border&gt;</span>
- <span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
+
 <p>Notice that the markup above encloses the entire contents of the markup 
file&#8217;s <code>&lt;body&gt;</code> with a 
<code>&lt;wicket:border&gt;</code> tag, as we described earlier. This lets the 
NavomaticBorder know how much of its markup to use when it wraps itself around 
the markup it finds in the context where it is used. Notice also the 
<code>&lt;wicket:body/&gt;</code> marker which designates where to put whatever 
is found inside the tag at the use context.</p>
 
 <p>Next, notice that the navigation links and the border&#8217;s 
<code>&lt;wicket:body/&gt;</code> are both enclosed in 
<code>&lt;span&gt;</code> tags which have wicket:id attributes that associate 
those tags with the BoxBorder components added in the NavomaticBorder 
constructor. These nested border components will each draw a thin black line 
around their contents.</p>
@@ -322,21 +211,6 @@
 <h3 id='webxml'>web.xml</h3>
 
 <p>In order to get this application up and running, we need to register the 
application with the Wicket servlet in the web.xml file. The following sections 
need to be added to the web.xml in the WEB-INF folder.</p>
-<div class='highlight'><pre><code class='xml'><span 
class='nt'>&lt;servlet&gt;</span>
-    <span class='nt'>&lt;servlet-name&gt;</span>NavomaticApplication<span 
class='nt'>&lt;/servlet-name&gt;</span>
-    <span 
class='nt'>&lt;servlet-class&gt;</span>org.apache.wicket.protocol.http.WicketServlet<span
 class='nt'>&lt;/servlet-class&gt;</span>
-    <span class='nt'>&lt;init-param&gt;</span>
-        <span class='nt'>&lt;param-name&gt;</span>applicationClassName<span 
class='nt'>&lt;/param-name&gt;</span>
-        <span 
class='nt'>&lt;param-value&gt;</span>wicket.examples.navomatic.NavomaticApplication<span
 class='nt'>&lt;/param-value&gt;</span>
-    <span class='nt'>&lt;/init-param&gt;</span>
-    <span class='nt'>&lt;load-on-startup&gt;</span>1<span 
class='nt'>&lt;/load-on-startup&gt;</span>
-<span class='nt'>&lt;/servlet&gt;</span>
-<span class='nt'>&lt;servlet-mapping&gt;</span>
-    <span class='nt'>&lt;servlet-name&gt;</span>NavomaticApplication<span 
class='nt'>&lt;/servlet-name&gt;</span>
-    <span class='nt'>&lt;url-pattern&gt;</span>/app/*<span 
class='nt'>&lt;/url-pattern&gt;</span>
-<span class='nt'>&lt;/servlet-mapping&gt;</span>
-</code></pre>
-</div>
                </div>
         <div id="clearer"></div>
                <div id="footer"><span>

Modified: wicket/common/site/trunk/_site/learn/examples/usingfragments.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/learn/examples/usingfragments.html?rev=1085437&r1=1085436&r2=1085437&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/learn/examples/usingfragments.html (original)
+++ wicket/common/site/trunk/_site/learn/examples/usingfragments.html Fri Mar 
25 16:00:25 2011
@@ -153,86 +153,17 @@
 <h2 id='creating_a_fragment'>Creating a Fragment</h2>
 
 <p>First things first, let&#8217;s create a page that we can add our fragments 
to. We will add a Loop that will repeat markup and choose a different Fragment 
for each item in the loop.</p>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;head&gt;&lt;/head&gt;</span>
-<span class='nt'>&lt;body&gt;</span>
-<span class='nt'>&lt;ul&gt;</span>
-<span class='nt'>&lt;li</span> <span class='na'>wicket:id=</span><span 
class='s'>&quot;list&quot;</span><span class='nt'>&gt;&lt;span</span> <span 
class='na'>wicket:id=</span><span class='s'>&quot;panel&quot;</span><span 
class='nt'>&gt;&lt;/span&gt;&lt;/li&gt;</span>
-<span class='nt'>&lt;/ul&gt;</span>
-<span class='nt'>&lt;wicket:fragment</span> <span 
class='na'>wicket:id=</span><span class='s'>&quot;fragment1&quot;</span><span 
class='nt'>&gt;</span>panel 1<span class='nt'>&lt;/wicket:fragment&gt;</span>
-<span class='nt'>&lt;wicket:fragment</span> <span 
class='na'>wicket:id=</span><span class='s'>&quot;fragment2&quot;</span><span 
class='nt'>&gt;</span>panel 2<span class='nt'>&lt;/wicket:fragment&gt;</span>
-<span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
-<p>As you can see in this markup file, we already took care of adding the 
fragment markup to the page in the <code>&lt;wicket:fragment&gt;</code> tags. 
Each fragment can contain its own markup and components. Those components need 
to be added to the Fragment instance in the Java file, just as you would do 
with a panel and web markup container.</p>
-<div class='highlight'><pre><code class='java'><span class='kn'>package</span> 
<span class='n'>wicket</span><span class='o'>.</span><span 
class='na'>quickstart</span><span class='o'>;</span>
 
-<span class='kn'>import</span> <span 
class='nn'>wicket.markup.html.list.Loop</span><span class='o'>;</span>
-<span class='kn'>import</span> <span 
class='nn'>wicket.markup.html.panel.Fragment</span><span class='o'>;</span>
+<p>As you can see in this markup file, we already took care of adding the 
fragment markup to the page in the <code>&lt;wicket:fragment&gt;</code> tags. 
Each fragment can contain its own markup and components. Those components need 
to be added to the Fragment instance in the Java file, just as you would do 
with a panel and web markup container.</p>
 
-<span class='kd'>public</span> <span class='kd'>class</span> <span 
class='nc'>Index</span> <span class='kd'>extends</span> <span 
class='n'>QuickStartPage</span> <span class='o'>{</span>
-    <span class='kd'>public</span> <span class='nf'>Index</span><span 
class='o'>()</span> <span class='o'>{</span>
-        <span class='n'>Loop</span> <span class='n'>loop</span> <span 
class='o'>=</span> <span class='k'>new</span> <span class='n'>Loop</span><span 
class='o'>(</span><span class='s'>&quot;list&quot;</span><span 
class='o'>,</span> <span class='mi'>5</span><span class='o'>)</span> <span 
class='o'>{</span>
-            <span class='kd'>protected</span> <span class='kt'>void</span> 
<span class='nf'>populateItem</span><span class='o'>(</span><span 
class='n'>LoopItem</span> <span class='n'>item</span><span class='o'>)</span> 
<span class='o'>{</span>
-                <span class='n'>String</span> <span 
class='n'>fragmentId</span> <span class='o'>=</span> <span 
class='s'>&quot;fragment&quot;</span> <span class='o'>+</span> <span 
class='o'>(</span><span class='n'>item</span><span class='o'>.</span><span 
class='na'>getIteration</span><span class='o'>()</span> <span 
class='o'>%</span> <span class='mi'>2</span> <span class='o'>+</span> <span 
class='mi'>1</span><span class='o'>);</span>
-                <span class='n'>item</span><span class='o'>.</span><span 
class='na'>add</span><span class='o'>(</span><span class='k'>new</span> <span 
class='n'>Fragment</span><span class='o'>(</span><span 
class='s'>&quot;panel&quot;</span><span class='o'>,</span> <span 
class='n'>fragmentId</span><span class='o'>));</span>
-            <span class='o'>}</span>
-        <span class='o'>};</span>
-        <span class='n'>add</span><span class='o'>(</span><span 
class='n'>loop</span><span class='o'>);</span>
-    <span class='o'>}</span>
-<span class='o'>}</span>
-</code></pre>
-</div>
 <p>The Loop will render 5 items, and the <code>populateItem</code> method will 
be called for each item. In each item we construct a fragment identifier that 
corresponds to the identifier in the <code>&lt;wicket:fragment&gt;</code>. The 
Fragment constructor takes the identifier of the markup it needs to attach to, 
and the fragment identifier telling it where to find the specific markup in the 
file.</p>
 
 <h2 id='adding_components_to_fragments'>Adding components to fragments</h2>
 
 <p>In the previous example we just showed different markup for each fragment, 
but you can add components to the fragments as well. Let&#8217;s add a label to 
fragment 1.</p>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;html&gt;</span>
-<span class='nt'>&lt;head&gt;&lt;/head&gt;</span>
-<span class='nt'>&lt;body&gt;</span>
-<span class='nt'>&lt;ul&gt;</span>
-<span class='nt'>&lt;li</span> <span class='na'>wicket:id=</span><span 
class='s'>&quot;list&quot;</span><span class='nt'>&gt;&lt;span</span> <span 
class='na'>wicket:id=</span><span class='s'>&quot;panel&quot;</span><span 
class='nt'>&gt;&lt;/span&gt;&lt;/li&gt;</span>
-<span class='nt'>&lt;/ul&gt;</span>
-<span class='nt'>&lt;wicket:fragment</span> <span 
class='na'>wicket:id=</span><span class='s'>&quot;fragment1&quot;</span><span 
class='nt'>&gt;</span>panel 1 <span class='nt'>&lt;span</span> <span 
class='na'>wicket:id=</span><span class='s'>&quot;label&quot;</span><span 
class='nt'>&gt;&lt;/span&gt;&lt;/wicket:fragment&gt;</span>
-<span class='nt'>&lt;wicket:fragment</span> <span 
class='na'>wicket:id=</span><span class='s'>&quot;fragment2&quot;</span><span 
class='nt'>&gt;</span>panel 2<span class='nt'>&lt;/wicket:fragment&gt;</span>
-<span class='nt'>&lt;/body&gt;</span>
-<span class='nt'>&lt;/html&gt;</span>
-</code></pre>
-</div>
+
 <p>In order to add the component to the first fragment we&#8217;ll introduce a 
subclass for fragment one to encapsulate the component.</p>
-<div class='highlight'><pre><code class='java'><span class='kn'>package</span> 
<span class='n'>wicket</span><span class='o'>.</span><span 
class='na'>quickstart</span><span class='o'>;</span>
 
-<span class='kn'>import</span> <span 
class='nn'>wicket.markup.html.basic.Label</span><span class='o'>;</span>
-<span class='kn'>import</span> <span 
class='nn'>wicket.markup.html.list.Loop</span><span class='o'>;</span>
-<span class='kn'>import</span> <span 
class='nn'>wicket.markup.html.panel.Fragment</span><span class='o'>;</span>
-
-<span class='kd'>public</span> <span class='kd'>class</span> <span 
class='nc'>Index</span> <span class='kd'>extends</span> <span 
class='n'>QuickStartPage</span> <span class='o'>{</span>
-    <span class='kd'>public</span> <span class='kd'>class</span> <span 
class='nc'>Fragment1</span> <span class='kd'>extends</span> <span 
class='n'>Fragment</span> <span class='o'>{</span>
-        <span class='kd'>public</span> <span class='nf'>Fragment1</span><span 
class='o'>(</span><span class='n'>String</span> <span class='n'>id</span><span 
class='o'>,</span> <span class='n'>String</span> <span 
class='n'>markupId</span><span class='o'>)</span> <span class='o'>{</span>
-            <span class='kd'>super</span><span class='o'>(</span><span 
class='n'>id</span><span class='o'>,</span> <span 
class='n'>markupId</span><span class='o'>);</span>
-            <span class='n'>add</span><span class='o'>(</span><span 
class='k'>new</span> <span class='n'>Label</span><span class='o'>(</span><span 
class='s'>&quot;label&quot;</span><span class='o'>,</span> <span 
class='s'>&quot;Hello, World!&quot;</span><span class='o'>));</span>
-        <span class='o'>}</span>
-    <span class='o'>}</span>
-
-    <span class='kd'>public</span> <span class='nf'>Index</span><span 
class='o'>()</span> <span class='o'>{</span>
-        <span class='n'>Loop</span> <span class='n'>loop</span> <span 
class='o'>=</span> <span class='k'>new</span> <span class='n'>Loop</span><span 
class='o'>(</span><span class='s'>&quot;list&quot;</span><span 
class='o'>,</span> <span class='mi'>5</span><span class='o'>)</span> <span 
class='o'>{</span>
-            <span class='kd'>protected</span> <span class='kt'>void</span> 
<span class='nf'>populateItem</span><span class='o'>(</span><span 
class='n'>LoopItem</span> <span class='n'>item</span><span class='o'>)</span> 
<span class='o'>{</span>
-                <span class='kt'>int</span> <span class='n'>index</span> <span 
class='o'>=</span> <span class='o'>(</span><span class='n'>item</span><span 
class='o'>.</span><span class='na'>getIteration</span><span class='o'>()</span> 
<span class='o'>%</span> <span class='mi'>2</span> <span class='o'>+</span> 
<span class='mi'>1</span><span class='o'>);</span>
-                <span class='n'>String</span> <span 
class='n'>fragmentId</span> <span class='o'>=</span> <span 
class='s'>&quot;fragment&quot;</span> <span class='o'>+</span> <span 
class='n'>index</span><span class='o'>;</span>
-                <span class='k'>if</span> <span class='o'>(</span><span 
class='n'>index</span> <span class='o'>==</span> <span class='mi'>1</span><span 
class='o'>)</span> <span class='o'>{</span>
-                    <span class='n'>item</span><span class='o'>.</span><span 
class='na'>add</span><span class='o'>(</span><span class='k'>new</span> <span 
class='n'>Fragment1</span><span class='o'>(</span><span 
class='s'>&quot;panel&quot;</span><span class='o'>,</span> <span 
class='n'>fragmentId</span><span class='o'>));</span>
-                <span class='o'>}</span> <span class='k'>else</span> <span 
class='o'>{</span>
-                    <span class='n'>item</span><span class='o'>.</span><span 
class='na'>add</span><span class='o'>(</span><span class='k'>new</span> <span 
class='n'>Fragment</span><span class='o'>(</span><span 
class='s'>&quot;panel&quot;</span><span class='o'>,</span> <span 
class='n'>fragmentId</span><span class='o'>));</span>
-                <span class='o'>}</span>
-            <span class='o'>}</span>
-        <span class='o'>};</span>
-        <span class='n'>add</span><span class='o'>(</span><span 
class='n'>loop</span><span class='o'>);</span>
-    <span class='o'>}</span>
-<span class='o'>}</span>
-</code></pre>
-</div>
 <p>The class <code>Fragment1</code> adds the label to itself. In the 
loop&#8217;s <code>populateItem</code> we alternate the fragments type between 
<code>Fragment</code> and <code>Fragment1</code>. This means that in the final 
page on one line you&#8217;ll see <code>&quot;panel 1 Hello, 
World!&quot;</code> and on the other line just <code>&quot;panel 
2&quot;</code>.</p>
 
 <h2 id='summary'>Summary</h2>

Modified: wicket/common/site/trunk/_site/learn/projects/authroles.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/learn/projects/authroles.html?rev=1085437&r1=1085436&r2=1085437&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/learn/projects/authroles.html (original)
+++ wicket/common/site/trunk/_site/learn/projects/authroles.html Fri Mar 25 
16:00:25 2011
@@ -195,12 +195,7 @@
 <h3 id='authorization'>Authorization</h3>
 
 <p>Annotation for configuring what roles are allowed for instantiation the 
annotated component or package. This annotation can be used for classes and 
packages, and can be used like this:</p>
-<div class='highlight'><pre><code class='java'><span class='c1'>// only users 
with role ADMIN are allowed to create instances of this page, whether it 
is</span>
-<span class='c1'>// either bookmarkable or not</span>
-<span class='nd'>@AuthorizeInstantiation</span><span class='o'>(</span><span 
class='s'>&quot;ADMIN&quot;</span><span class='o'>)</span>
-<span class='kd'>public</span> <span class='kd'>class</span> <span 
class='nc'>AdminAnnotationsBookmarkablePage</span> <span 
class='kd'>extends</span> <span class='n'>WebPage</span>
-</code></pre>
-</div>
+
 <p>When someone who doesn&#8217;t have the role ADMIN, Wicket will not allow 
the page to be fully constructed and throw an authorization exception during 
the construction of the page. This will result in an access denied page for the 
user.</p>
 
 <p>Enablng the annotations for role based authorization is done by setting the 
<code>WebApplication#getSecuritySettings</code> value to 
<code>AnnotationsRoleAuthorizationStrategy</code>. Then you can use the 
auth/roles provided authorization annotations.</p>
@@ -230,13 +225,7 @@
 <h3 id='using_maven'>Using Maven</h3>
 
 <p>Add the following dependency to your pom:</p>
-<div class='highlight'><pre><code class='xml'><span 
class='nt'>&lt;dependency&gt;</span>
-    <span class='nt'>&lt;groupId&gt;</span>org.apache.wicket<span 
class='nt'>&lt;/groupId&gt;</span>
-    <span class='nt'>&lt;artifactId&gt;</span>wicket-auth-roles<span 
class='nt'>&lt;/artifactId&gt;</span>
-    <span class='nt'>&lt;version&gt;</span>1.4.16<span 
class='nt'>&lt;/version&gt;</span>
-<span class='nt'>&lt;/dependency&gt;</span>
-</code></pre>
-</div>
+
 <h3 id='required_dependencies'>Required dependencies</h3>
 
 <p>Wicket Auth/Roles requires the following jar files to be on your 
classpath:</p>

Modified: wicket/common/site/trunk/_site/learn/projects/velocity.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/learn/projects/velocity.html?rev=1085437&r1=1085436&r2=1085437&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/learn/projects/velocity.html (original)
+++ wicket/common/site/trunk/_site/learn/projects/velocity.html Fri Mar 25 
16:00:25 2011
@@ -161,16 +161,7 @@
 <p>Velocity brings a templating language to your users. You can let them 
create conditional markup, use loops and do all other things made possible by 
Velocity.</p>
 
 <p>Velocity templates look like the following:</p>
-<div class='highlight'><pre><code class='html'>#set ($foo = 
&quot;deoxyribonucleic acid&quot;)
-#set ($bar = &quot;ribonucleic acid&quot;)
 
-#if ($foo == $bar)
-  In this case it&#39;s clear they aren&#39;t equivalent. So...
-#else
-  They are not equivalent and this will be the output.
-#end
-</code></pre>
-</div>
 <p>Read <a 
href='http://velocity.apache.org/engine/releases/velocity-1.4/user-guide.html'>more</a>
 about the Velocity template language.</p>
 
 <p>This project allows you to use Velocity templates as a component within 
your Wicket pages, and let them live next to Wicket components. A typical 
usecase would be to enable your users to embed Velocity templates in your 
application and using that as a type of portlet.</p>
@@ -180,32 +171,15 @@
 <h2 id='example'>Example</h2>
 
 <p>Showing Hello, World using Velocity in a Wicket application, embedded in a 
Wicket page.</p>
-<div class='highlight'><pre><code class='html'><span 
class='nt'>&lt;h2&gt;</span>This is a Velocity template<span 
class='nt'>&lt;/h2&gt;</span>
 
-<span class='nt'>&lt;p&gt;</span>The secret message is: $message<span 
class='nt'>&lt;/p&gt;</span>
-</code></pre>
-</div>
 <p>In this template we want to replace the string <code>$message</code> with 
the text &#8220;Hello, World!&#8221;. <code>$message</code> is Velocity markup 
denoting a variable that is taken from the context that is provided to the 
Velocity rendering engine.</p>
 
 <p>To use Velocity in your Wicket pages we provide a 
<code>VelocityPanel</code> which enables you to generate parts of your page 
using Velocity markup. Adding the panel to your Wicket page is shown in the 
following example:</p>
-<div class='highlight'><pre><code class='java'><span class='kd'>public</span> 
<span class='nf'>VelocityPage</span><span class='o'>()</span> <span 
class='o'>{</span>
-       <span class='n'>HashMap</span><span class='o'>&lt;</span><span 
class='n'>String</span><span class='o'>,</span> <span 
class='n'>String</span><span class='o'>&gt;</span> <span 
class='n'>values</span> <span class='o'>=</span> <span class='k'>new</span> 
<span class='n'>HashMap</span><span class='o'>&lt;</span><span 
class='n'>String</span><span class='o'>,</span> <span 
class='n'>String</span><span class='o'>&gt;();</span>
-       <span class='n'>values</span><span class='o'>.</span><span 
class='na'>put</span><span class='o'>(</span><span 
class='s'>&quot;message&quot;</span><span class='o'>,</span> <span 
class='s'>&quot;Hello, World!&quot;</span><span class='o'>);</span>
-       <span class='n'>Model</span><span class='o'>&lt;</span><span 
class='n'>HashMap</span><span class='o'>&lt;</span><span 
class='n'>String</span><span class='o'>,</span> <span 
class='n'>String</span><span class='o'>&gt;&gt;</span> <span 
class='n'>context</span> <span class='o'>=</span> <span 
class='n'>Model</span><span class='o'>.</span><span class='na'>of</span><span 
class='o'>(</span><span class='n'>values</span><span class='o'>);</span>
-       
-       <span class='n'>UrlResourceStream</span> <span 
class='n'>template</span> <span class='o'>=</span> <span class='k'>new</span> 
<span class='n'>UrlResourceStream</span><span class='o'>(</span><span 
class='n'>getClass</span><span class='o'>().</span><span 
class='na'>getResource</span><span class='o'>(</span><span 
class='s'>&quot;test.html&quot;</span><span class='o'>));</span>
-       <span class='n'>add</span><span class='o'>(</span><span 
class='n'>VelocityPanel</span><span class='o'>.</span><span 
class='na'>forTemplateResource</span><span class='o'>(</span><span 
class='s'>&quot;velocityPanel&quot;</span><span class='o'>,</span> <span 
class='n'>context</span><span class='o'>,</span> <span 
class='n'>template</span><span class='o'>));</span>
-<span class='o'>}</span>
-</code></pre>
-</div>
+
 <p><code>VelocityPanel.forTemplateResource</code> creates a 
<code>VelocityPanel</code> and sets up the engine such that the context is 
merged with the template with each render.</p>
 
 <p>The markup of the page is quite simple: adding a VelocityPanel is as simple 
as using a <code>div</code> and attaching a <code>wicket:identifier</code> to 
it. The following example shows this.</p>
-<div class='highlight'><pre><code class='html'><span class='cp'>&lt;!DOCTYPE 
html&gt;</span>
-<span class='nt'>&lt;h1&gt;</span>This is a test page for Velocity<span 
class='nt'>&lt;/h1&gt;</span>
-<span class='nt'>&lt;div</span> <span class='na'>wicket:id=</span><span 
class='s'>&quot;velocityPanel&quot;</span><span 
class='nt'>&gt;&lt;/div&gt;</span>
-</code></pre>
-</div>
+
 <h2 id='installing'>Installing</h2>
 
 <p>Installing Wicket Velocity can be done through adding a dependency in your 
project&#8217;s Maven pom, or by putting the wicket-velocity.jar and the 
required dependencies in your projects classpath.</p>
@@ -213,13 +187,7 @@
 <h3 id='using_maven'>Using Maven</h3>
 
 <p>Add the following dependency to your pom:</p>
-<div class='highlight'><pre><code class='xml'><span 
class='nt'>&lt;dependency&gt;</span>
-    <span class='nt'>&lt;groupId&gt;</span>org.apache.wicket<span 
class='nt'>&lt;/groupId&gt;</span>
-    <span class='nt'>&lt;artifactId&gt;</span>wicket-velocity<span 
class='nt'>&lt;/artifactId&gt;</span>
-    <span class='nt'>&lt;version&gt;</span>1.4.16<span 
class='nt'>&lt;/version&gt;</span>
-<span class='nt'>&lt;/dependency&gt;</span>
-</code></pre>
-</div>
+
 <h3 id='required_dependencies'>Required dependencies</h3>
 
 <p>Wicket Velocity requires the following jar files to be on your 
classpath:</p>

Modified: wicket/common/site/trunk/_site/start/download.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/start/download.html?rev=1085437&r1=1085436&r2=1085437&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/start/download.html (original)
+++ wicket/common/site/trunk/_site/start/download.html Fri Mar 25 16:00:25 2011
@@ -173,21 +173,9 @@
 <h2 id='maven_2'>Maven 2</h2>
 
 <p>Add the following snippet to your Maven project descriptor 
(<code>pom.xml</code>):</p>
-<div class='highlight'><pre><code class='xml'><span 
class='nt'>&lt;dependency&gt;</span>
-    <span class='nt'>&lt;groupId&gt;</span>org.apache.wicket<span 
class='nt'>&lt;/groupId&gt;</span>
-    <span class='nt'>&lt;artifactId&gt;</span>wicket<span 
class='nt'>&lt;/artifactId&gt;</span>
-    <span class='nt'>&lt;version&gt;</span>1.4.16<span 
class='nt'>&lt;/version&gt;</span>
-<span class='nt'>&lt;/dependency&gt;</span>
-</code></pre>
-</div>
+
 <p>For the SLF4J log4j binding:</p>
-<div class='highlight'><pre><code class='xml'><span 
class='nt'>&lt;dependency&gt;</span>
-    <span class='nt'>&lt;groupId&gt;</span>org.slf4j<span 
class='nt'>&lt;/groupId&gt;</span>
-    <span class='nt'>&lt;artifactId&gt;</span>slf4j-log4j12<span 
class='nt'>&lt;/artifactId&gt;</span>
-    <span class='nt'>&lt;version&gt;</span>1.5.6<span 
class='nt'>&lt;/version&gt;</span>
-<span class='nt'>&lt;/dependency&gt;</span>
-</code></pre>
-</div>
+
 <h2 id='snapshots_and_latest_bleedingedge_code'>SNAPSHOTs and latest 
bleeding-edge code</h2>
 
 <p>If you wish to build the latest code from scratch, the two branches live in 
the following places in Subversion:</p>
@@ -203,15 +191,6 @@
 </ul>
 
 <p>There&#8217;s also a Maven 2 repository providing SNAPSHOTs available 
here:</p>
-<div class='highlight'><pre><code class='xml'><span 
class='nt'>&lt;repositories&gt;</span>
-    <span class='nt'>&lt;repository&gt;</span>
-        <span class='nt'>&lt;id&gt;</span>org.wicketstuff<span 
class='nt'>&lt;/id&gt;</span>
-        <span class='nt'>&lt;name&gt;</span>Wicket Stuff Repository<span 
class='nt'>&lt;/name&gt;</span>
-        <span 
class='nt'>&lt;url&gt;</span>http://wicketstuff.org/maven/repository<span 
class='nt'>&lt;/url&gt;</span>
-    <span class='nt'>&lt;/repository&gt;</span>
-<span class='nt'>&lt;/repositories&gt;</span>
-</code></pre>
-</div>
                </div>
         <div id="clearer"></div>
                <div id="footer"><span>

Added: wicket/common/site/trunk/learn/books/awc.jpg
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/learn/books/awc.jpg?rev=1085437&view=auto
==============================================================================
Binary file - no diff available.

Propchange: wicket/common/site/trunk/learn/books/awc.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: wicket/common/site/trunk/learn/books/awc.md
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/learn/books/awc.md?rev=1085437&view=auto
==============================================================================
--- wicket/common/site/trunk/learn/books/awc.md (added)
+++ wicket/common/site/trunk/learn/books/awc.md Fri Mar 25 16:00:25 2011
@@ -0,0 +1,87 @@
+---
+layout: default
+title: Books — Apache Wicket Cookbook
+---
+
+## Description ##
+
+Apache Wicket is one of the most famous Java web application frameworks. 
Wicket simplifies web development and makes it fun. Are you bored of going 
through countless pages of theory to find out how to get your web development 
done? With this book in hand, you don't need to go through hundreds of pages to 
figure out how you will actually build a web application. You will get 
practical solutions to your common everyday development tasks to pace up your 
development activities.
+
+Apache Wicket Cookbook provides you with information that gets your problems 
solved quickly without beating around the bush. This book is perfect for you if 
you are ready to take the next step from tutorials and step into the practical 
world. It will take you beyond the basics of using Apache Wicket and show you 
how to leverage Wicket's advanced features to create simpler and more 
maintainable solutions to what at first may seem complex problems.
+
+You will learn how to integrate with client-side technologies such as 
JavaScript libraries or Flash components, which will help you to build your 
application faster. You will discover how to use Wicket paradigms to factor out 
commonly used code into custom Components, which will reduce the maintenance 
cost of your application, and how to leverage the existing Wicket Components to 
make your own code simpler.
+
+A straightforward Cookbook with over 75 highly focused practical recipes to 
make your web application development easier with the Wicket web framework
+
+## What you will learn from this book ##
+
+* Leverage Wicket to implement a wide variety of both simple and advanced use 
cases in a narrative that gets straight to the point
+* Make forms work in the crazy world of the Web by learning the ways of 
Wicket's form processing
+* Simplify localizing your Wicket applications
+* Take the boring out of your forms by discovering how to improve the user 
experience while simplifying your code at the same time
+* Leverage the built-in Table component to make displaying tabular data a snap
+* Think Wicket's Borders are not very useful? Learn to use them in unexpected 
places to simplify things
+* See how to integrate with Flash components and create interactive charts at 
the same time
+* Web 1.0 too boring? Learn how to tame Wicket's AJAX support and bring your 
application into Web 2.0
+* Simplify your security code by learning various security techniques
+* An application cannot be built with Wicket alone; see how to make it play 
nice with other frameworks
+
+## Approach ##
+
+This is a hands-on practical guide to a large variety of topics and use cases. 
This book tries to use real-world examples when possible, but is not afraid to 
come up with a contrived pretext if it makes explaining the problem simpler. 
Unlike a lot of other books, this one does not try to maintain a continuous 
theme from chapter to chapter, such as demonstrating solutions on the same 
fictional application; doing so would be almost impossible given the wide 
variety of recipes presented here. Instead, this book concentrates on focused 
problems users are likely to encounter and shows clear solutions in a 
step-by-step manner. This book tries to teach by example and is not afraid to 
show a lot of code because, after all, it is for coders.
+
+## Who this book is written for ##
+
+This book is for current users of the Apache Wicket framework; it is not an 
introduction to Wicket that will bore you with tons of theory. You are expected 
to have built or maintained a simple Wicket application in the past and to be 
looking to learn new and better ways of using Wicket. If you are ready to take 
your Wicket skills to the next level this book is for you.
+
+## About the author ##
+
+Igor Vaynberg is a software architect with more than ten years of experience 
in the software field. His liking for computers was sparked when his parents 
got him a Sinclair Z80 when he was but ten years old. Since then he has worked 
with companies both large and small building modular and scalable web 
applications. Igor's main interest is finding ways to simply the development of 
complex user interfaces required by modern web applications. Igor is a 
committer for the Apache Wicket framework, the aim of which is to simply the 
programming model as well as reintroduce OOP to the web UI tier. In his AFK 
time he enjoys snowboarding with his beautiful wife and playing with his 
amazing children.
+
+
+## Book details ##
+
+<table>
+       <tr>
+               <th>Title</th>
+               <td>Apache Wicket Cookbook</td>
+       </tr>
+       <tr>
+               <th>Author</th>
+               <td>Igor Vaynberg</td>
+       </tr>
+       <tr>
+               <th>Version covered</th>
+               <td>Wicket 1.4, but most material is applicable to Wicket 
1.5</td>
+       </tr>
+       <tr>
+               <th>Publisher URL</th>
+               <td><a 
href="http://www.packtpub.com/apache-wicket-cookbook/book";>Apache Wicket 
Cookbook</a></td>
+       </tr>
+       <tr>
+               <th>Paperback</th>
+               <td>312 pages</td>
+       </tr>
+       <tr>
+               <th>Date</th>
+               <td>March, 2011</td>
+       </tr>
+       <tr>
+               <th>Language</th>
+               <td>English</td>
+       </tr>
+       <tr>
+               <th>ISBN-10</th>
+               <td>1849511608</td>
+       </tr>
+       <tr>
+               <th>ISBN-13</th>
+               <td>978-1-84951-160-5</td>
+       </tr>
+       <tr>
+               <th>Buy</th>
+               <td><a 
href="http://www.packtpub.com/apache-wicket-cookbook/book";>PACKT 
Publishing</a></td>
+       </tr>
+</table>
+               
+

Modified: wicket/common/site/trunk/learn/books/index.md
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/learn/books/index.md?rev=1085437&r1=1085436&r2=1085437&view=diff
==============================================================================
--- wicket/common/site/trunk/learn/books/index.md (original)
+++ wicket/common/site/trunk/learn/books/index.md Fri Mar 25 16:00:25 2011
@@ -3,9 +3,10 @@ layout: default
 title: Books about Wicket
 ---
 
-Several books have been written about Apache Wicket, 3 in English, 2 in German
+Several books have been written about Apache Wicket, 4 in English, 2 in German
 and 1 in Japanese. Click on a cover to learn more about each book.
 
+<a href="awc.html"><img src="awc.jpg" height="300px" alt="Apache Wicket 
Cookbook cover" title="Apache Wicket Cookbook" /></a>
 <a href="wia.html"><img src="wia.png" height="300px" alt="Wicket in Action 
cover" title="Wicket in Action" /></a>
 <a href="ewdww.html"><img src="ewdww.png" height="300px" alt="Enjoying Web 
Development with Wicket cover" title="Enjoying Web Development with Wicket" 
/></a>
 <a href="prowicket.html"><img src="prowicket.png" height="300px" alt="Pro 
Wicket cover" title="Pro Wicket" /></a>


Reply via email to