<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>STUQ.nl &#187; Productivity</title>
	<atom:link href="http://stuq.nl/category/productivity/feed" rel="self" type="application/rss+xml" />
	<link>http://stuq.nl</link>
	<description></description>
	<lastBuildDate>Thu, 30 Dec 2010 10:23:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>3 risks with Agile decision making</title>
		<link>http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making</link>
		<comments>http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making#comments</comments>
		<pubDate>Tue, 22 Jun 2010 20:37:30 +0000</pubDate>
		<dc:creator>Daan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Scrum]]></category>

		<guid isPermaLink="false">http://stuq.nl/?p=565</guid>
		<description><![CDATA[Agile teams are generally cohesive and are empowered and expected to make day-to-day decisions. A large part of empowerment in Agile methods is that the team makes the decisions, not the project manager. However, there are some risks involved with this type of decision making. In this article I describe some possible risks. Group think [...]<p>Read the original at <a href="http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making">3 risks with Agile decision making</a> or go to the homepage of <a href="http://stuq.nl">STUQ.nl</a></p>


<br/><br/>
Related posts:<ul><li><a href='http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features' rel='bookmark' title='It’s not about the features!'>It’s not about the features!</a></li>
<li><a href='http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming' rel='bookmark' title='Interaction Design and Extreme Programming'>Interaction Design and Extreme Programming</a></li>
<li><a href='http://stuq.nl/weblog/2008-12-10/6-reasons-to-create-user-interface-mockups' rel='bookmark' title='6 reasons to create user interface mockups'>6 reasons to create user interface mockups</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-576 alignright" style="margin-left: 10px;" title="Warning" src="http://stuq.nl/media/warning1-150x150.jpg" alt="" width="150" height="150" />Agile teams are generally cohesive and are empowered and expected to make day-to-day decisions. A large part of empowerment in Agile methods is that the team makes the decisions, not the project manager. However, there are some risks involved with this type of decision making. In this article I describe some possible risks.</p>
<h3>Group think</h3>
<p>The first risk in decision making is <strong>group think</strong>.</p>
<p>Group think has the following symptoms:</p>
<ul>
<li>Little or no consideration of alternate plans</li>
<li>Risk is not assessed</li>
<li>No review is taken of rejected plans</li>
<li>Advice from outsiders is not sought</li>
<li>Facts that support the plan are acknowledged, facts that do not support the plan are ignored</li>
<li>Contingency plans are not created</li>
</ul>
<p>Surprisingly, synergy and loyalty to each other and to the team leader are a team’s greatest qualities, however, they are the same factors that lead to group think.</p>
<h3>Abilene Paradox symptom</h3>
<p>The second risk in decision making is the <strong>Abilene Paradox symptom</strong>.</p>
<p>The Abilene Paradox symptom has the following symptoms:</p>
<ul>
<li>Members, as individuals, privately agree on the correct decision to make. This is not shared with the group.</li>
<li>Members, as individuals, privately agree on how the problem or situation being addressed can be resolved. This is not shared with the group.</li>
<li>Instead of communicating their views, members keep their views and reservations to themselves, agreeing with views they are opposed to. As the individuals have not presented their views and reservations, a collective decision is made that is actually contrary to the views of all members.</li>
<li>Members feel frustration, even anger, at this and find someone, or some people, to blame.</li>
</ul>
<p>The Abilene Paradox is real. How often have you agreed to a suboptimal solution? What if every other team member felt the same way about this solution?</p>
<h3>Decision hijacking</h3>
<p>The third risk in decision making is <strong>decision hijacking</strong>. This happens when for example a developer implements features that are not needed right now. The developer hijacks the decision to implement these features.</p>
<p>Example during daily stand-up:<br />
Developer: The customer databases will be used by several applications, so I have implemented support for dealing with various technologies, including Oracle. It took a lot of time. Scrum master: Did we not agree on postponing this? Developer: We need this later and now it is done.”</p>
<p>Decision hijacking is a big problem because the decision making itself is removed from the team as a whole. This behavior has a big impact on trust within the team.</p>
<h3>Solutions</h3>
<p><strong>Conflict in Agile software development projects</strong> can be beneficial to both process and product.</p>
<p>The literature proposes some solutions to the problems with decision making described above. These solutions are based on the existence or stimulation of intra-group conflict:</p>
<ul>
<li>Separate groups should be formed, under different leaders, to propose solutions to the same problem (groupthink)</li>
<li>A devil’s advocate should be appointed (groupthink, Abilene paradox)</li>
</ul>
<p>For the decision hijacking risk, make sure that developers are on the same page. Working together as a team means taking decisions together.</p>
<p><strong>Sources</strong>:</p>
<ol>
<li>McAvoy, John, en Tom Butler. “The role of project management in ineffective decision making within Agile software development projects.” European Journal of Information Systems 18.4 (2009): 372-383. Web.</li>
<li>Moe, Nils Brede, Torgeir Dingsøyr, en Tore Dybå. “A teamwork model for understanding an agile team: A case study of a Scrum project.” Information and Software Technology 52.5 (2010): 480-491. Web.</li>
</ol>
<p>Read the original at <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvd2VibG9nLzIwMTAtMDYtMjIvMy1yaXNrcy13aXRoLWFnaWxlLWRlY2lzaW9uLW1ha2luZw==">3 risks with Agile decision making</a> or go to the homepage of <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmw=">STUQ.nl</a></p>
 <img src="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=565" width="1" height="1" style="display: none;" /><div id="simple_socialmedia"><ul class="ssm_row"><li class="sharetext">Share:</li><li class="twitter"><a target="_blank" href="http://twitter.com/share?url=http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making&amp;text=3 risks with Agile decision making&amp;via=daanvanetten">Tweet</a></li><li class="facebook"><a target="_blank" title="Share on Facebook" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making&amp;t=3 risks with Agile decision making">Facebook</a></li><li class="linkedin"><a target="_blank" title="Share on LinkedIn" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making&amp;title=3 risks with Agile decision making&amp;source=STUQ.nl">LinkedIn</a></li><li class="tumblr"><a target="_blank" title="Share on Tumblr" rel="nofollow" href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fstuq.nl%2Fweblog%2F2010-06-22%2F3-risks-with-agile-decision-making&name=STUQ.nl&description=3+risks+with+Agile+decision+making" title="Share on Tumblr">Tumblr</a></li><li class="stumble"><a target="_blank" title="Share on StumbleUpon" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making">Stumble</a></li><li class="digg"><a target="_blank" title="Share on Digg" rel="nofollow" href="http://www.digg.com/submit?phase=2&amp;url=http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making">Digg</a></li><li class="delicious"><a target="_blank" title="Share on Delicious" rel="nofollow" href="http://del.icio.us/post?url=http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making&amp;title=INSERT_TITLE">Delicious</a></li></ul></div>

<br/><br/><p>Related posts:<ul><li><a href='http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features' rel='bookmark' title='It’s not about the features!'>It’s not about the features!</a></li>
<li><a href='http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming' rel='bookmark' title='Interaction Design and Extreme Programming'>Interaction Design and Extreme Programming</a></li>
<li><a href='http://stuq.nl/weblog/2008-12-10/6-reasons-to-create-user-interface-mockups' rel='bookmark' title='6 reasons to create user interface mockups'>6 reasons to create user interface mockups</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>It’s not about the features!</title>
		<link>http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features</link>
		<comments>http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features#comments</comments>
		<pubDate>Tue, 01 Jun 2010 21:47:31 +0000</pubDate>
		<dc:creator>Daan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Scrum]]></category>

		<guid isPermaLink="false">http://stuq.nl/?p=559</guid>
		<description><![CDATA[I believe that any software developing company that wants to have a competitive advantage needs to stop focusing on just building features, but instead focus on the users.<p>Read the original at <a href="http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features">It’s not about the features!</a> or go to the homepage of <a href="http://stuq.nl">STUQ.nl</a></p>


<br/><br/>
Related posts:<ul><li><a href='http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making' rel='bookmark' title='3 risks with Agile decision making'>3 risks with Agile decision making</a></li>
<li><a href='http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming' rel='bookmark' title='Interaction Design and Extreme Programming'>Interaction Design and Extreme Programming</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-560 alignleft" title="Struktable Strukt multi touch table" src="http://stuq.nl/media/struktable-03-23-09-150x150.jpg" alt="" width="150" height="150" /></p>
<p>I believe that any software developing company that wants to have a competitive advantage needs to stop focusing on just building features, but instead focus on the users.</p>
<p>Many companies seem to focus on the checklist of features that are dreamed up by marketing. Most of these checklists result from doing ‘competitive analysis’, just look at what the competitors, and do that too. Development teams have to copy all the software features of the competition, just to keep up. That is mediocrity at its best.</p>
<p>Developing software is not a unique trait. It’s not that hard as it used to be, the lab coats are long since gone. Coding can be outsourced to China or India at a fraction of the cost, as can many other aspects of software development.</p>
<p>Shipping a huge amount of features became relatively cheap. The time of industrialization has come for software development. Lines of code are becoming cheaper every minute. A lot of open source software (‘free software’) now has the same (or more) features as commercial available software.</p>
<p>So, it is not about building a huge amount of features.</p>
<p>It is about building clever software that works really well, in its context. Companies have to build revolutionary, groundbreaking, surprisingly good software to be noticed and successful. It has to be different and fresh, revolutionary perhaps.</p>
<p>How do you do that? Invest in interaction design. Do research to find out who your users really are. Talk to them. The <strong>real</strong> users.</p>
<p>Learn about them. Find out what they need. Find out what they like, what they don’t like.<br />
Learn where your software becomes part of their lives.</p>
<p>Learn how to improve. Improve your software, and learn more. Make your users happy. Never lose them out of sight.</p>
<p>Read the original at <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvd2VibG9nLzIwMTAtMDYtMDEvaXQlZTIlODAlOTlzLW5vdC1hYm91dC10aGUtZmVhdHVyZXM=">It’s not about the features!</a> or go to the homepage of <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmw=">STUQ.nl</a></p>
 <img src="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=559" width="1" height="1" style="display: none;" /><div id="simple_socialmedia"><ul class="ssm_row"><li class="sharetext">Share:</li><li class="twitter"><a target="_blank" href="http://twitter.com/share?url=http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features&amp;text=It’s not about the features!&amp;via=daanvanetten">Tweet</a></li><li class="facebook"><a target="_blank" title="Share on Facebook" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features&amp;t=It’s not about the features!">Facebook</a></li><li class="linkedin"><a target="_blank" title="Share on LinkedIn" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features&amp;title=It’s not about the features!&amp;source=STUQ.nl">LinkedIn</a></li><li class="tumblr"><a target="_blank" title="Share on Tumblr" rel="nofollow" href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fstuq.nl%2Fweblog%2F2010-06-01%2Fit%25e2%2580%2599s-not-about-the-features&name=STUQ.nl&description=It%E2%80%99s+not+about+the+features%21" title="Share on Tumblr">Tumblr</a></li><li class="stumble"><a target="_blank" title="Share on StumbleUpon" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features">Stumble</a></li><li class="digg"><a target="_blank" title="Share on Digg" rel="nofollow" href="http://www.digg.com/submit?phase=2&amp;url=http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features">Digg</a></li><li class="delicious"><a target="_blank" title="Share on Delicious" rel="nofollow" href="http://del.icio.us/post?url=http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features&amp;title=INSERT_TITLE">Delicious</a></li></ul></div>

<br/><br/><p>Related posts:<ul><li><a href='http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making' rel='bookmark' title='3 risks with Agile decision making'>3 risks with Agile decision making</a></li>
<li><a href='http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming' rel='bookmark' title='Interaction Design and Extreme Programming'>Interaction Design and Extreme Programming</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Automatically test your Wicket panel HTML markup</title>
		<link>http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup</link>
		<comments>http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup#comments</comments>
		<pubDate>Sun, 01 Nov 2009 20:03:04 +0000</pubDate>
		<dc:creator>Daan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Wicket Tutorials]]></category>
		<category><![CDATA[JUnit]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Unit testing]]></category>
		<category><![CDATA[Wicket]]></category>

		<guid isPermaLink="false">http://stuq.nl/?p=471</guid>
		<description><![CDATA[Are you testing your HTML markup automatically yet? If your markup does not match the Java code, your Wicket panel does not work. It’s easy to get early feedback when your panels are broken: just unit test them!

In this blog post I describe a way of automatically verifying that the HTML markup of Wicket panels match the Java code. <strong>Scroll down to download the demo project!</strong><p>Read the original at <a href="http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup">Automatically test your Wicket panel HTML markup</a> or go to the homepage of <a href="http://stuq.nl">STUQ.nl</a></p>


<br/><br/>
Related posts:<ul><li><a href='http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup' rel='bookmark' title='Wicket: how to write a reusable modal window popup'>Wicket: how to write a reusable modal window popup</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
<li><a href='http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket' rel='bookmark' title='User friendly form validation with Wicket'>User friendly form validation with Wicket</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Are you testing your HTML markup automatically yet? If your markup does not match the Java code, your Wicket panel does not work. It’s easy to get early feedback when your panels are broken: just unit test them!</p>
<p>In this blog post I describe a way of automatically verifying that the HTML markup of Wicket panels match the Java code. <strong>Scroll down to download the demo project!</strong></p>
<h3>Unit test</h3>
<p><img style="float: right; clear: right; padding: 5px;" title="Unit testing Wicket panels with Eclipse" src="http://stuq.nl/media/eclipse-unit-testing.png" alt="Unit testing Wicket panels with Eclipse" />I created a JUnit test that you can add to your project to <strong>automatically test as much Wicket Panels</strong> as possible. Automatic testing works by resolving all panels on the Java class path and feeding them to the WicketTester. When a panel has invalid markup, the WicketTester will give an error: early feedback!</p>
<h3>How does it work?</h3>
<p>The Wicket panels that can automatically be tested should have a ‘default’ Wicket constructor, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> DemoPanel<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> id<span style="color: #009900;">&#41;</span></pre></div></div>

<p>Resolving all panels is done with Spring 2.5’s <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0YXRpYy5zcHJpbmdzb3VyY2Uub3JnL3NwcmluZy9kb2NzLzIuNS54L2FwaS9vcmcvc3ByaW5nZnJhbWV3b3JrL2NvbnRleHQvYW5ub3RhdGlvbi9DbGFzc1BhdGhTY2FubmluZ0NhbmRpZGF0ZUNvbXBvbmVudFByb3ZpZGVyLmh0bWw=" target=\"_blank\">ClassPathScanningCandidateComponentProvider</a> (don’t you love those names! How can they stay below 120 characters per line?)</p>
<p>The <strong>ClassPathScanningCandidateComponentProvider</strong> is a component provider that scans the classpath from a base package. It then applies exclude and include filters to the resulting classes to find candidates.</p>
<h3>Testing panels</h3>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Test
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> testAllWicketPanels<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
        WicketTester wicketTester <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WicketTester<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> WicketApplication<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    	ClassPathScanningCandidateComponentProvider provider <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ClassPathScanningCandidateComponentProvider<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        provider.<span style="color: #006633;">addIncludeFilter</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> AssignableTypeFilter<span style="color: #009900;">&#40;</span><span style="color: #003399;">Panel</span>.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">Set</span> components <span style="color: #339933;">=</span> provider.<span style="color: #006633;">findCandidateComponents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;nl/stuq/demo&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>BeanDefinition component <span style="color: #339933;">:</span> components<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">Class</span> clazz <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">Class</span>.<span style="color: #006633;">forName</span><span style="color: #009900;">&#40;</span>component.<span style="color: #006633;">getBeanClassName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>hasDefaultConstructor<span style="color: #009900;">&#40;</span>clazz<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            	testWicketPanel<span style="color: #009900;">&#40;</span>wicketTester, clazz<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> testWicketPanel<span style="color: #009900;">&#40;</span>WicketTester wicketTester, <span style="color: #000000; font-weight: bold;">Class</span> clazz<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	wicketTester.<span style="color: #006633;">startPanel</span><span style="color: #009900;">&#40;</span>clazz<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	wicketTester.<span style="color: #006633;">assertNoErrorMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	wicketTester.<span style="color: #006633;">assertNoInfoMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">boolean</span> hasDefaultConstructor<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">Class</span> clazz<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Constructor</span> constructor <span style="color: #339933;">:</span> clazz.<span style="color: #006633;">getConstructors</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>constructor.<span style="color: #006633;">getParameterTypes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">length</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span>
               constructor.<span style="color: #006633;">getParameterTypes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">getSimpleName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;String&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>The test instantiates a new WicketTester. After that, the <strong>ClassPathScanningCandidateComponentProvider</strong> is created and configured to scan only for Panel classes in the <tt>nl.stuq.demo</tt> package and below.<br />
After that, the found components are all checked. If they have a default constructor, the test is executed.</p>
<p>The <strong>boolean hasDefaultConstructor(clazz)</strong> method checks if the class has a constructor with only one String argument, the Wicket id.</p>
<h3>Keep in mind</h3>
<ul>
<li>This is only for lazy people (good developers are lazy in some ways).</li>
<li>You need a dependency to Spring.</li>
<li>Only Panels with a certain constructor are tested.</li>
<li>Only instantiating the Panel is tested, so code coverage has no meaning for this test. <strong>Real testing is still needed.</strong></li>
</ul>
<h3>Download demo project</h3>
<p>The demo project is a Maven project based on the Wicket 1.4.3 quickstart that contains the test class and an example panel to be tested.<br />
<strong><a onclick=\"javascript: pageTracker._trackPageview('/downloads/media/code/demo-automatic-panel-testing.zip');\" href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=L21lZGlhL2NvZGUvZGVtby1hdXRvbWF0aWMtcGFuZWwtdGVzdGluZy56aXA=">Download demo project</a></strong>.</p>
<p>Extract the zip file and run <strong>mvn test</strong> to run the tests. Then fire up your IDE and check how it&#8217;s done.</p>
<p>You can change or adapt the given JUnit test to also automatically test classes extending from Page or Component.</p>
<p>Join in with your opinions and code! I’m curious to see what clever way you have of testing code.</p>
<p>Read the original at <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvd2VibG9nLzIwMDktMTEtMDEvYXV0b21hdGljYWxseS10ZXN0LXlvdXItd2lja2V0LXBhbmVsLWh0bWwtbWFya3Vw">Automatically test your Wicket panel HTML markup</a> or go to the homepage of <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmw=">STUQ.nl</a></p>
 <img src="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=471" width="1" height="1" style="display: none;" /><div id="simple_socialmedia"><ul class="ssm_row"><li class="sharetext">Share:</li><li class="twitter"><a target="_blank" href="http://twitter.com/share?url=http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup&amp;text=Automatically test your Wicket panel HTML markup&amp;via=daanvanetten">Tweet</a></li><li class="facebook"><a target="_blank" title="Share on Facebook" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup&amp;t=Automatically test your Wicket panel HTML markup">Facebook</a></li><li class="linkedin"><a target="_blank" title="Share on LinkedIn" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup&amp;title=Automatically test your Wicket panel HTML markup&amp;source=STUQ.nl">LinkedIn</a></li><li class="tumblr"><a target="_blank" title="Share on Tumblr" rel="nofollow" href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fstuq.nl%2Fweblog%2F2009-11-01%2Fautomatically-test-your-wicket-panel-html-markup&name=STUQ.nl&description=Automatically+test+your+Wicket+panel+HTML+markup" title="Share on Tumblr">Tumblr</a></li><li class="stumble"><a target="_blank" title="Share on StumbleUpon" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup">Stumble</a></li><li class="digg"><a target="_blank" title="Share on Digg" rel="nofollow" href="http://www.digg.com/submit?phase=2&amp;url=http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup">Digg</a></li><li class="delicious"><a target="_blank" title="Share on Delicious" rel="nofollow" href="http://del.icio.us/post?url=http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup&amp;title=INSERT_TITLE">Delicious</a></li></ul></div>

<br/><br/><p>Related posts:<ul><li><a href='http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup' rel='bookmark' title='Wicket: how to write a reusable modal window popup'>Wicket: how to write a reusable modal window popup</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
<li><a href='http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket' rel='bookmark' title='User friendly form validation with Wicket'>User friendly form validation with Wicket</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Interaction Design and Extreme Programming</title>
		<link>http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming</link>
		<comments>http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming#comments</comments>
		<pubDate>Wed, 11 Feb 2009 20:25:29 +0000</pubDate>
		<dc:creator>Daan</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://stuq.nl/?p=418</guid>
		<description><![CDATA[There is a discussion about combining interaction design and extreme programming. Alan Cooper says you should do interaction design before doing anything else. Kent Beck disagrees as he wants to integrate interaction design in the iterations of XP. What is your opinion?<p>Read the original at <a href="http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming">Interaction Design and Extreme Programming</a> or go to the homepage of <a href="http://stuq.nl">STUQ.nl</a></p>


<br/><br/>
Related posts:<ul><li><a href='http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features' rel='bookmark' title='It’s not about the features!'>It’s not about the features!</a></li>
<li><a href='http://stuq.nl/weblog/2008-12-10/6-reasons-to-create-user-interface-mockups' rel='bookmark' title='6 reasons to create user interface mockups'>6 reasons to create user interface mockups</a></li>
<li><a href='http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making' rel='bookmark' title='3 risks with Agile decision making'>3 risks with Agile decision making</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img style="float: left;" title="Discussions are fun!" src="http://stuq.nl/media/boxing-150x150.jpg" alt="Discussions are fun!" width="150" height="150" />Today I visited <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy50bm8ubmwvY29udGVudC5jZm0/Y29udGV4dD1vdmVydG5vJmFtcDtjb250ZW50PW92ZXJ0bm9zdWImYW1wO2xhYWcxPTMyJmFtcDtpdGVtX2lkPTYz">TNO Information and Communication Technology</a> to socialize and share some ideas, which was really inspiring. We covered almost everything, from <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvY2F0ZWdvcnkvc2NydW0=">Scrum</a> to <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5kYWloYXRzdS5jb20vY2F0YWxvZ3VlL2N1b3JlL2luZGV4Lmh0bWw=">buying cars</a> to the <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3ZpZGVvLmdvb2dsZS5jb20vdmlkZW9wbGF5P2RvY2lkPTYxMjc1NDg4MTM5NTAwNDMyMDA=">paradox of choice</a> and much more. Agile minds wander along random paths, I guess&#8230;</p>
<p>Anyhow, Erik talked about the discussion of <strong>combining user centered design/interaction design and extreme programming</strong>. Here is a small analysis of both and some pointers for anyone taking interest in the discussion.</p>
<p><strong>Basically, the discussion boils down to this</strong>: Alan Cooper says you should do interaction design before doing anything else. Kent Beck disagrees as he wants to integrate interaction design in the iterations of XP. What is your opinion?</p>
<h2>What is Interaction Design?</h2>
<p><a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9JbnRlcmFjdGlvbl9kZXNpZ24="> Interaction Design</a> deals with user related issues and tries to build products starting from the users point of view and not from the implementation or technological side.  This “user-centered design“ approach is proposed by Alan Cooper, a very well known author in the usability community.  He positions the task of interaction design as the first phase prior to the other phases of the waterfall model. It is important for him that no line is coded before interaction design is done in order not to influence or narrow interaction issues by pieces of the product that are already present. (<a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N1bm5zZWl0bi5pd29sZi5mYXN0bWFpbC5mbS9wcm9qZWN0cy94cF9pbnRlcmFjdGlvbl9kZXNpZ25fY29tcGxldGUucGRm">source</a>)</p>
<h2>What is Extreme Programming?</h2>
<p>The <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9FeHRyZW1lX3Byb2dyYW1taW5n">Extreme Programming software development methodology</a> was conceived by Kent Beck.  It presents an alternative to the waterfall model of software engineering by encouraging practices that invite early feedback and iteration based development.</p>
<h2>Kent and Alan discussing</h2>
<p>It seems the <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5mYXdjZXR0ZS5jb20vaW50ZXJ2aWV3cy9iZWNrX2Nvb3Blci9kZWZhdWx0LmFzcA==">link to the original discussion</a> is not working. Fortunately, <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dlYi5hcmNoaXZlLm9yZy93ZWIvMjAwMzA2MjExMTI0MzQvaHR0cDovL3d3dy5mYXdjZXR0ZS5jb20vaW50ZXJ2aWV3cy9iZWNrX2Nvb3Blci9kZWZhdWx0LmFzcA==">archive.org has it</a>.</p>
<p><strong>Alan Cooper</strong> says at the end of the discussion:</p>
<blockquote><p>The interaction designers would begin a field study of the businesspeople and what they&#8217;re trying to accomplish, and of the staff in the organization and what problems they&#8217;re trying to solve. Then I would do a lot of field work talking to users, trying to understand what their goals are and trying to get an understanding of how would you differentiate the user community. Then, we would apply our goal-directed method to this to develop a set of user personas that we use as our creation and testing tools. Then, we would begin our transformal process of sketching out a solution of how the product would behave and what problems it would solve.</p>
<p>Next, we go through a period of back-and-forth, communicating what we&#8217;re proposing and why, so that they can have buy-in. When they consent, we create a detailed set of blueprints for the behavior of that product.</p>
<p>As we get more and more detailed in the description of the behavior, we&#8217;re talking to the developers to make sure they understand it and can tell us their point of view.</p>
<p>At a certain point, the detailed blueprints would be complete and they would be known by both sides. Then there would be a semiformal passing of the baton to the development team where they would begin construction. At this point, all the tenets of XP would go into play, with a couple of exceptions. First, while requirements always shift, the interaction design gives you a high-level solution that&#8217;s of a much better quality than you would get by talking directly to customers. Second, the amount of shifting that goes on should be reduced by three or four orders of magnitude.</p></blockquote>
<p><strong>Kent</strong> tries to prevent the &#8216;phases&#8217; in developing software with XP. He responds:</p>
<blockquote><p>I&#8217;ll divide what Alan is talking about into two things: a set of techniques, and the larger process into which they fit. While I&#8217;m 100 percent with the techniques themselves, I&#8217;m 100 percent against the process that he described for using them. The techniques are optimized for being thoughtful in a cognitively difficult, complicated area where you&#8217;re breaking new ground, and the thinking that&#8217;s embedded in the practices is absolutely essential to doing effective software development.</p>
<p>[..]</p>
<p>To me, the shining city on the hill is to create a process that uses XP engineering and the story writing out of interaction design. This could create something that&#8217;s really far more effective than either of those two things in isolation.</p></blockquote>
<p><strong>It would be great if interaction design and extreme programming or other agile techniques can be combined.</strong> I have been in projects without the input of an interaction designer. After some time, you see where the user interface should be improved, but you have no time or knowledge to solve the issues. In my opinion, an interaction designer definitely has it&#8217;s place after starting a project.</p>
<p>But&#8230; I have no idea if it would work to start a project from the interaction design phase, as Alan proposes. I think a &#8216;proof of concept&#8217; at the start of a project is very helpful, but when reading the discussion, Alan prohibits doing technical stuff when doing interaction design up-front&#8230;</p>
<p><strong>Interesting discussion! What&#8217;s your opinion on this? Can interaction design and extreme programming be combined?</strong></p>
<p>Read the original at <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvd2VibG9nLzIwMDktMDItMTEvaW50ZXJhY3Rpb24tZGVzaWduLWFuZC1leHRyZW1lLXByb2dyYW1taW5n">Interaction Design and Extreme Programming</a> or go to the homepage of <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmw=">STUQ.nl</a></p>
 <img src="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=418" width="1" height="1" style="display: none;" /><div id="simple_socialmedia"><ul class="ssm_row"><li class="sharetext">Share:</li><li class="twitter"><a target="_blank" href="http://twitter.com/share?url=http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming&amp;text=Interaction Design and Extreme Programming&amp;via=daanvanetten">Tweet</a></li><li class="facebook"><a target="_blank" title="Share on Facebook" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming&amp;t=Interaction Design and Extreme Programming">Facebook</a></li><li class="linkedin"><a target="_blank" title="Share on LinkedIn" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming&amp;title=Interaction Design and Extreme Programming&amp;source=STUQ.nl">LinkedIn</a></li><li class="tumblr"><a target="_blank" title="Share on Tumblr" rel="nofollow" href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fstuq.nl%2Fweblog%2F2009-02-11%2Finteraction-design-and-extreme-programming&name=STUQ.nl&description=Interaction+Design+and+Extreme+Programming" title="Share on Tumblr">Tumblr</a></li><li class="stumble"><a target="_blank" title="Share on StumbleUpon" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming">Stumble</a></li><li class="digg"><a target="_blank" title="Share on Digg" rel="nofollow" href="http://www.digg.com/submit?phase=2&amp;url=http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming">Digg</a></li><li class="delicious"><a target="_blank" title="Share on Delicious" rel="nofollow" href="http://del.icio.us/post?url=http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming&amp;title=INSERT_TITLE">Delicious</a></li></ul></div>

<br/><br/><p>Related posts:<ul><li><a href='http://stuq.nl/weblog/2010-06-01/it%e2%80%99s-not-about-the-features' rel='bookmark' title='It’s not about the features!'>It’s not about the features!</a></li>
<li><a href='http://stuq.nl/weblog/2008-12-10/6-reasons-to-create-user-interface-mockups' rel='bookmark' title='6 reasons to create user interface mockups'>6 reasons to create user interface mockups</a></li>
<li><a href='http://stuq.nl/weblog/2010-06-22/3-risks-with-agile-decision-making' rel='bookmark' title='3 risks with Agile decision making'>3 risks with Agile decision making</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://stuq.nl/weblog/2009-02-11/interaction-design-and-extreme-programming/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User friendly form validation with Wicket</title>
		<link>http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket</link>
		<comments>http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket#comments</comments>
		<pubDate>Wed, 03 Sep 2008 21:12:21 +0000</pubDate>
		<dc:creator>Daan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Wicket Tutorials]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>By default Wicket shows error messages together in a single place in the HTML form. This has some drawbacks to usability, especially if you have long forms with lots of fields. Read further for a tutorial exploring possibilities to improve the location of the error on the page, thereby improving usability.</p>
<p>Read the original at <a href="http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket">User friendly form validation with Wicket</a> or go to the homepage of <a href="http://stuq.nl">STUQ.nl</a></p>


<br/><br/>
Related posts:<ul><li><a href='http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup' rel='bookmark' title='Wicket: how to write a reusable modal window popup'>Wicket: how to write a reusable modal window popup</a></li>
<li><a href='http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup' rel='bookmark' title='Automatically test your Wicket panel HTML markup'>Automatically test your Wicket panel HTML markup</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>By default Wicket shows error messages together in a single place in the HTML form. This has some drawbacks to usability, especially if you have long forms with lots of fields. Read further for a tutorial exploring possibilities to improve the location of the error on the page, thereby improving usability.</p>
<p>The default FeedbackPanel shows all errors in one place. When you enter a wrong value in an input field below the fold, the input field is a mile away from the error above the form. This makes it unclear which error message corresponds to which field.</p>
<p><img style="float: left;" src="http://stuq.nl/media/image/form-usability-scanning.png" border="0" alt="form-usability-scanning.png" height="242" /></p>
<p>The image on the left shows that a lot of page scanning is needed even with moderate sized forms.</p>
<p>With more than a few fields, the user is confused as which error corresponds to which field. It is a big problem when your e-commerce site scares away many potential clients who can&#8217;t complete your web forms!</p>
<h3 style="clear: both;">The default form</h3>
<p>Before I describe how to create a more user friendly form, first the &#8216;default&#8217; form. The following is an example of a standard Wicket form. This kind of form is the one you get without doing any &#8216;special&#8217; magic things. <strong>Place your mouse cursor over the image to see the default error messages above the form.</strong></p>
<p><img onmouseover="this.src='http://stuq.nl/media/image/form-usability-default-invalid.png'" onmouseout="this.src='http://stuq.nl/media/image/form-usability-default-valid.png'" src="http://stuq.nl/media/image/form-usability-default-valid.png" border="0" alt="Default Wicket form with FeedbackPanel at the top" height="150" /></p>
<p style="clear: both;">This form will be the starting point for our improvements.</p>
<h3>The improved form</h3>
<p>This is what we are going to make:</p>
<p><img src="http://stuq.nl/media/image/form-usability-tutorial-invalid.png" border="0" alt="Better and improved Wicket form with FeedbackLabels throughout" height="100" /></p>
<p style="clear: both;">As you can see, the error messages are directly next to the component that caused the error. This reduces the scanning of the page to link the error message to the right form component.</p>
<h3>Step 1: Introducing the FeedbackLabel</h3>
<p>The FeedbackLabel is a custom component I&#8217;ve written for this tutorial. With this custom label, you can show important feedback messages related to a FormComponent.</p>
<p>This has the advantage that you can place your Feedback messages in any place you want.</p>
<p>Add this to the Java part of the form:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// This shows feedback when the name input is not correct.</span>
FeedbackLabel nameFeedbackLabel <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FeedbackLabel<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;name.feedback&quot;</span>, name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
form.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>nameFeedbackLabel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
FeedbackLabel colorFeedbackLabel <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FeedbackLabel<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;color.feedback&quot;</span>, color, customText<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
form.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>colorFeedbackLabel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Add another SPAN tag for every feedback label. You can place this near the relevant form component within the form.</p>
<h3>Step 2: Removing the FeedbackPanel completely? No, filtering!</h3>
<p>At first, it looks like you can remove the FeedbackPanel completely. But, then you will not be able to use the info() method to display text inside the FeedbackPanel! Therefore we need a way to filter the FeedbackMessages so error messages are not shown. I have written a FeedbackMessageFilter to accomplish that. It filters out the unwanted error messages.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// filteredErrorLevels will not be shown in the FeedbackPanel</span>
<span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> filteredErrorLevels <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span>FeedbackMessage.<span style="color: #006633;">ERROR</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
feedback.<span style="color: #006633;">setFilter</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> ErrorLevelsFeedbackMessageFilter<span style="color: #009900;">&#40;</span>filteredErrorLevels<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I have included the ErrorLevelsFeedbackMessageFilter in the project files, so you can reuse this in your existing projects. Remember if you use the error() method, you cannot use this filter! Instead, create your own filter that filters based on components.</p>
<h3>Step 3: Adding some style, the ComponentVisualErrorBehavior™</h3>
<p>I always love extremely long class names, like the <em>BookmarkablePageRequestTargetUrlCodingStrategy</em> or the <em>SharedResourceRequestTargetUrlCodingStrategy</em>. It makes my day to introduce a class name consisting of four words, the <strong>ComponentVisualErrorBehavior™</strong>.</p>
<p>This behavior changes the CSS styles for components that are invalid according to the Wicket form validation. You see in the screenshot that the textfield has a red line around it. This is the result of the ComponentVisualErrorBehavior. You can easily change the styles that are applied.</p>
<p><img src="http://stuq.nl/media/image/form-usability-tutorial-namefield.png" border="0" alt="form-usability-tutorial-namefield.png" width="358" height="48" /></p>
<p>To add the ComponentVisualErrorBehavior to your component, just add one line in your Java code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">name.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> ComponentVisualErrorBehavior<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;onblur&quot;</span>, nameFeedbackLabel<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>&#8220;onblur&#8221; stands for the event that triggers this Behavior. The nameFeedbackLabel will also be updated when this is triggered, so that it will show the relevant error (or nothing if the input is valid).</p>
<h3>Download</h3>
<p><a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvbWVkaWEvY29kZS9kZW1vLWZvcm1zLnppcA==">Download the complete example project</a> and start experimenting! (run with mvn jetty:run and connect to http://localhost:8080/demo)</p>
<p>Let me know how and where you use it in the comments!</p>
<p>Read the original at <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvd2VibG9nLzIwMDgtMDktMDMvdXNlci1mcmllbmRseS1mb3JtLXZhbGlkYXRpb24td2l0aC13aWNrZXQ=">User friendly form validation with Wicket</a> or go to the homepage of <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmw=">STUQ.nl</a></p>
 <img src="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=77" width="1" height="1" style="display: none;" /><div id="simple_socialmedia"><ul class="ssm_row"><li class="sharetext">Share:</li><li class="twitter"><a target="_blank" href="http://twitter.com/share?url=http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket&amp;text=User friendly form validation with Wicket&amp;via=daanvanetten">Tweet</a></li><li class="facebook"><a target="_blank" title="Share on Facebook" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket&amp;t=User friendly form validation with Wicket">Facebook</a></li><li class="linkedin"><a target="_blank" title="Share on LinkedIn" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket&amp;title=User friendly form validation with Wicket&amp;source=STUQ.nl">LinkedIn</a></li><li class="tumblr"><a target="_blank" title="Share on Tumblr" rel="nofollow" href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fstuq.nl%2Fweblog%2F2008-09-03%2Fuser-friendly-form-validation-with-wicket&name=STUQ.nl&description=User+friendly+form+validation+with+Wicket" title="Share on Tumblr">Tumblr</a></li><li class="stumble"><a target="_blank" title="Share on StumbleUpon" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket">Stumble</a></li><li class="digg"><a target="_blank" title="Share on Digg" rel="nofollow" href="http://www.digg.com/submit?phase=2&amp;url=http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket">Digg</a></li><li class="delicious"><a target="_blank" title="Share on Delicious" rel="nofollow" href="http://del.icio.us/post?url=http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket&amp;title=INSERT_TITLE">Delicious</a></li></ul></div>

<br/><br/><p>Related posts:<ul><li><a href='http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup' rel='bookmark' title='Wicket: how to write a reusable modal window popup'>Wicket: how to write a reusable modal window popup</a></li>
<li><a href='http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup' rel='bookmark' title='Automatically test your Wicket panel HTML markup'>Automatically test your Wicket panel HTML markup</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket/feed</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Create RESTful URLs with Wicket</title>
		<link>http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket</link>
		<comments>http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket#comments</comments>
		<pubDate>Fri, 20 Jun 2008 22:32:12 +0000</pubDate>
		<dc:creator>Daan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Wicket Tutorials]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<img style="float: right;" src="http://stuq.nl/media/image/wicket_logo.png" /><p>This is a tutorial on using Wicket with REST-style URLs. Normally, Wicket generates URLs that are a bit ugly. <br/>For example:<br/>
<i>http://www.example.com/wui/?wicket:bookmarkablePage=%3Anl.stuq.demo.SomePage</i>. </p><p>Uch!</p><p>RESTful URLs change that: they are more meaningful for the user, hide some of your implementation details, and are just beautiful. Plus, you're joining one of the latest hypes. Life couldn't be better...</p>
<p>Read the original at <a href="http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket">Create RESTful URLs with Wicket</a> or go to the homepage of <a href="http://stuq.nl">STUQ.nl</a></p>


<br/><br/>
Related posts:<ul><li><a href='http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket' rel='bookmark' title='User friendly form validation with Wicket'>User friendly form validation with Wicket</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup' rel='bookmark' title='Wicket: how to write a reusable modal window popup'>Wicket: how to write a reusable modal window popup</a></li>
<li><a href='http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup' rel='bookmark' title='Automatically test your Wicket panel HTML markup'>Automatically test your Wicket panel HTML markup</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img style="float: left;" src="http://stuq.nl/media/image/wicket_logo.png" alt="" /></p>
<p>This is a tutorial on using Wicket with REST-style URLs. Normally, Wicket generates URLs that are a bit ugly.<br />
For example:</p>
<p><em>http://www.example.com/wui/?wicket:bookmarkablePage=%3Anl.stuq.demo.SomePage</em>.</p>
<p>Ugly!</p>
<p>RESTful URLs change that: they are more meaningful for the user, hide some of your implementation details, and are just beautiful. Plus, you&#8217;re joining one of the latest hypes. Life couldn&#8217;t be better&#8230;</p>
<p><a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5nb29nbGUuY29tL3NlYXJjaD9obD1lbiZhbXA7cT13aWNrZXQrcmVzdGZ1bCZhbXA7YnRuRz1Hb29nbGUrU2VhcmNo" target=\"_blank\">Looking around on the intertubes</a>, there is not much useful information about using RESTful URLs in Wicket. Because I need this for a project I&#8217;m currently working on, I decided to turn this into a small tutorial.</p>
<h3>What is REST?</h3>
<p><strong>Representational State Transfer (REST)</strong> is a software architectural style for distributed hypermedia systems like the world wide web. The best way to explain this, is an example. A REST application might define the following resources:</p>
<ul>
<li>http://example.com/users/</li>
<li>http://example.com/users/{user} (one for each user)</li>
<li>http://example.com/findUserForm</li>
<li>http://example.com/locations/</li>
<li>http://example.com/locations/{location} (one for each location)</li>
<li>http://example.com/findLocationForm</li>
</ul>
<p>This is a very, very short explanation of only a small part of what REST does. More information, as always, can be <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9SZXByZXNlbnRhdGlvbmFsX1N0YXRlX1RyYW5zZmVy" target=\"_blank\">found on Wikipedia</a>.</p>
<p>When you use custom URLs, you effectively hide some of your internal structure behind more meaningful URLs. This means you can refactor more easily without breaking external links or bookmarks to a specific part of your site. This is also important for search engine optimization.</p>
<p><strong>Note:</strong> I&#8217;m not going to describe here when you should or should not use REST<br />
with Wicket. That&#8217;s an architectural discussion, which depends greatly<br />
on your project. I have discovered some limitations in the Wicket development model that prevent the full implementation of REST. Please read further for more information.</p>
<h3>First steps</h3>
<p>I suggest you <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvbWVkaWEvY29kZS9kZW1vLXJlc3RmdWwuemlw">download the code</a> first and read along during the rest of this post.</p>
<p>We are going to create a customer overview page and a products overview page, reachable on &#8220;http://example.com/customers/&#8221; and &#8220;http://example.com/products/&#8221;.</p>
<p>The HomePage has two links, to the customer list and the product list. The product and customer lists have links to each individual product (http://example.com/products/${ID}) and customer (http://example.com/customers/${ID}).</p>
<p>For the Wicket UI, I created a HomePage, which links to the CustomerOverviewPage and ProductOverviewPage, which link to the Customer and Product detail pages. To serve up the data, we have some simple services, a ProductService and a CustomerService.</p>
<p><img style="clear: both;" src="http://stuq.nl/media/image/demo-urls-structure.png" alt="" /></p>
<h3>The code</h3>
<p>Wicket has a nice built in method of declaring (mounting) custom URL schemes. Simply give a class which implements the <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53aWNrZXRmcmFtZXdvcmsub3JnL2FwaWRvY3Mvd2lja2V0L3JlcXVlc3QvdGFyZ2V0L2NvZGluZy9JUmVxdWVzdFRhcmdldFVybENvZGluZ1N0cmF0ZWd5Lmh0bWw=" target=\"_blank\">IRequestTargetUrlCodingStrategy</a> interface to a WebApplication.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">void</span> mount<span style="color: #009900;">&#40;</span>IRequestTargetUrlCodingStrategy encoder<span style="color: #009900;">&#41;</span></pre></div></div>

<p>Relatively new in Wicket is the <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dpY2tldC5hcGFjaGUub3JnL2FwaWRvY3MvMS40L29yZy9hcGFjaGUvd2lja2V0L3JlcXVlc3QvdGFyZ2V0L2NvZGluZy9NaXhlZFBhcmFtVXJsQ29kaW5nU3RyYXRlZ3kuaHRtbA==" target=\"_blank\">MixedParamUrlCodingStrategy</a>, which we will use in a minute.</p>
<p>This is an example of how to use the MixedParamUrlCodingStrategy in your WebApplication class:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">public</span> WicketApplication<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
        MixedParamUrlCodingStrategy productURLS <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MixedParamUrlCodingStrategy<span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">&quot;products&quot;</span>,
                ProductDetailPage.<span style="color: #000000; font-weight: bold;">class</span>,
                <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;id&quot;</span><span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        mount<span style="color: #009900;">&#40;</span>productURLS<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This means:</p>
<ul>
<li>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&quot;products&quot;</pre></div></div>

<p><em>This is the part of the URL after the Wicket&#8217;s application URL. In this case: &#8220;http://www.example.com/<strong>products</strong>&#8220;</em></li>
<li>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">ProductDetailPage.<span style="color: #000000; font-weight: bold;">class</span></pre></div></div>

<p><em>This defines for which class this URL is meant. In our project, the ProductDetailPage shows a product&#8217;s details.</em></li>
<li>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;id&quot;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p><em>This is a list of all the parameters that you want to pass to this page. This shows up in the URL like this: &#8220;http://www.example.com/products/<strong>23</strong>&#8221; for a product with ID 23. You can easily pass more parameters to this page by adding items to this String array.</em></li>
<li>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">mount<span style="color: #009900;">&#40;</span>productURLS<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><em>This passes this MixedParamUrlCodingStrategy to the WebApplication.</em></li>
</ul>
<h3>The Product detail page</h3>
<p>The ProductDetailPage receives these URL parameters in the following way:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> ProductDetailPage<span style="color: #009900;">&#40;</span>PageParameters parameters<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">int</span> id <span style="color: #339933;">=</span> parameters.<span style="color: #006633;">getInt</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>After that, you can get the Product with this ID (the rest of the code can be downloaded below):</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">setModel<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> CompoundPropertyModel<span style="color: #009900;">&#40;</span>productService.<span style="color: #006633;">getProduct</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Label</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Label</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;name&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> BookmarkablePageLink<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;backLink&quot;</span>, getApplication<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getHomePage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Limitations of Wicket</h3>
<p>It is currently not possibly (without doing a workaround outside Wicket) to do HTTP PUT, DELETE and POSTs to arbitrary URLs. If you do know how to achieve this, you are very welcome to post it in the comments.</p>
<h3>Further steps</h3>
<p>In the above tutorial we configured the URL&#8217;s in the WebApplication init() method. This has the drawback that information about a single page is in muliple places. It is good from an architecture perspective to configure the URL&#8217;s from the Page itself. Look at the wicket-stuff annotation project for more information on how to do that. You can find <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dpY2tldHN0dWZmLm9yZy9jb25mbHVlbmNlL2Rpc3BsYXkvU1RVRkZXSUtJL3dpY2tldHN0dWZmLWFubm90YXRpb24=" target=\"_blank\">an excellent tutorial</a> there. The wicketstuff-annotation library is used to mount your pages declaratively via Java annotations.</p>
<h3>Further reading</h3>
<ul>
<li>Putting more variables in a URL, AJAX resistent: <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dpY2tldC5hcGFjaGUub3JnL2FwaWRvY3MvMS40L29yZy9hcGFjaGUvd2lja2V0L3JlcXVlc3QvdGFyZ2V0L2NvZGluZy9IeWJyaWRVcmxDb2RpbmdTdHJhdGVneS5QYWdlSW5mb0V4dHJhY3Rpb24uaHRtbA==" target=\"_blank\">HybridUrlCodingStrategy</a></li>
<li><a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5tYWlsLWFyY2hpdmUuY29tL3dpY2tldC11c2VyQGxpc3RzLnNvdXJjZWZvcmdlLm5ldC9tc2czMDczMS5odG1s" target=\"_blank\">Wicket mailing list: Can I get a &#8216;Nice URL&#8217; when form validation fails?</a></li>
</ul>
<h3>Download</h3>
<p><a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvbWVkaWEvY29kZS9kZW1vLXJlc3RmdWwuemlw">Download the complete example project</a> and start experimenting! (run with mvn jetty:run and connect to http://localhost:8080/demo)</p>
<p>Let me know how and where you use it in the comments!</p>
<p>Read the original at <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvd2VibG9nLzIwMDgtMDYtMjAvY3JlYXRlLXJlc3RmdWwtdXJscy13aXRoLXdpY2tldA==">Create RESTful URLs with Wicket</a> or go to the homepage of <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmw=">STUQ.nl</a></p>
 <img src="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=72" width="1" height="1" style="display: none;" /><div id="simple_socialmedia"><ul class="ssm_row"><li class="sharetext">Share:</li><li class="twitter"><a target="_blank" href="http://twitter.com/share?url=http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket&amp;text=Create RESTful URLs with Wicket&amp;via=daanvanetten">Tweet</a></li><li class="facebook"><a target="_blank" title="Share on Facebook" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket&amp;t=Create RESTful URLs with Wicket">Facebook</a></li><li class="linkedin"><a target="_blank" title="Share on LinkedIn" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket&amp;title=Create RESTful URLs with Wicket&amp;source=STUQ.nl">LinkedIn</a></li><li class="tumblr"><a target="_blank" title="Share on Tumblr" rel="nofollow" href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fstuq.nl%2Fweblog%2F2008-06-20%2Fcreate-restful-urls-with-wicket&name=STUQ.nl&description=Create+RESTful+URLs+with+Wicket" title="Share on Tumblr">Tumblr</a></li><li class="stumble"><a target="_blank" title="Share on StumbleUpon" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket">Stumble</a></li><li class="digg"><a target="_blank" title="Share on Digg" rel="nofollow" href="http://www.digg.com/submit?phase=2&amp;url=http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket">Digg</a></li><li class="delicious"><a target="_blank" title="Share on Delicious" rel="nofollow" href="http://del.icio.us/post?url=http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket&amp;title=INSERT_TITLE">Delicious</a></li></ul></div>

<br/><br/><p>Related posts:<ul><li><a href='http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket' rel='bookmark' title='User friendly form validation with Wicket'>User friendly form validation with Wicket</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup' rel='bookmark' title='Wicket: how to write a reusable modal window popup'>Wicket: how to write a reusable modal window popup</a></li>
<li><a href='http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup' rel='bookmark' title='Automatically test your Wicket panel HTML markup'>Automatically test your Wicket panel HTML markup</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Wicket: how to write a reusable modal window popup</title>
		<link>http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup</link>
		<comments>http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup#comments</comments>
		<pubDate>Wed, 04 Jun 2008 23:22:47 +0000</pubDate>
		<dc:creator>Daan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Wicket Tutorials]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>Wicket is a Java framework for creating web frontends. It allows you to create a webpage in Java, combining all kinds of components into one page. <br/>
In many projects, a subset of user interface elements are repeated over the site. Depending on your project, you can have different selection panels or popups that are used multiple times.</p>

<p>In the following tutorial I describe a method to write your own application specific reusable modal window popup.</p>
<p>Read the original at <a href="http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup">Wicket: how to write a reusable modal window popup</a> or go to the homepage of <a href="http://stuq.nl">STUQ.nl</a></p>


<br/><br/>
Related posts:<ul><li><a href='http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup' rel='bookmark' title='Automatically test your Wicket panel HTML markup'>Automatically test your Wicket panel HTML markup</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
<li><a href='http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket' rel='bookmark' title='User friendly form validation with Wicket'>User friendly form validation with Wicket</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Wicket is a Java framework for creating web frontends. It allows you to create a webpage in Java, combining all kinds of components into one page.</p>
<p>In many projects, a subset of user interface elements are repeated over the site. Depending on your project, you can have different selection panels or popups that are used multiple times.</p>
<p>In the following tutorial I describe a method to write your own application specific reusable modal window popup.</p>
<h3>Start!</h3>
<p>For this example, we use the <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53aWNrZXRmcmFtZXdvcmsub3JnL3dpY2tldC1leHRlbnNpb25zL2FwaWRvY3Mvd2lja2V0L2V4dGVuc2lvbnMvYWpheC9tYXJrdXAvaHRtbC9tb2RhbC9Nb2RhbFdpbmRvdy5odG1s" target=\"_blank\">ModalWindow</a> component from <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dpY2tldC5zb3VyY2Vmb3JnZS5uZXQvd2lja2V0LWV4dGVuc2lvbnMvaW5kZXguaHRtbA==" target=\"_blank\">Wicket Extensions</a>.If you don’t know what a ModalWindow looks like, you can <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53aWNrZXQtbGlicmFyeS5jb20vd2lja2V0LWV4YW1wbGVzL2FqYXgvbW9kYWwtd2luZG93LjE=" target=\"_blank\">see a demo</a>. (hint: try to drag and drop it or resize it)</p>
<h3>The example from Wicket extensions</h3>
<p>The <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53aWNrZXQtbGlicmFyeS5jb20vd2lja2V0LWV4YW1wbGVzL2FqYXgvbW9kYWwtd2luZG93LjE=" target=\"_blank\">default example from the Wicket Extensions site</a> contains no real reusable components, besides the ModalWindow itself. The Page inside the ModalWindow is tightly coupled to the ModalWindow. It closes its containing ModalWindow and sets a result parameter of the parent page. The components can only be reused in exactly the same way.</p>
<h3>How can we make this more reusable?</h3>
<p>We can make this more reusable by making the content of the ModalWindow not aware of the ModalWindow itself. The content does not know what will happen when the containing Form (or other data) is submitted. But how can we do that? The magic words are: <strong>abstract methods</strong>.</p>
<p><img style="float: right;" src="/media/image/demo-reusability-structure.jpg" alt="" />Before we start, you can <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=L21lZGlhL2NvZGUvZGVtby1yZXVzYWJpbGl0eS56aXA=">download the code here</a>, so you can get the complete picture.</p>
<p>The image on the right contains the structure of the page and the components we are creating. The page contains a modal window, which in turn contains a content panel.</p>
<h3>The Content Panel</h3>
<p>Lets start with the content panel inside the ModalWindow popup. This panel contains a selection link, a selection button and a cancel button, created in the constructor:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> SelectContentPanel<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> id<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Create the form, to use later for the buttons</span>
  Form form <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Form<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;form&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  add<span style="color: #009900;">&#40;</span>form<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Add some example 'selection' methods, to show as example</span>
  <span style="color: #666666; font-style: italic;">// You can also use a full fledged form, I left that as an</span>
  <span style="color: #666666; font-style: italic;">// exercise for the reader :-)</span>
  add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> AjaxLink<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;selectionLink&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onClick<span style="color: #009900;">&#40;</span>AjaxRequestTarget target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      onSelect<span style="color: #009900;">&#40;</span>target, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Selection using the link.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  form.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> AjaxButton<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;selectionButton&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">void</span> onSubmit<span style="color: #009900;">&#40;</span>AjaxRequestTarget target, Form form<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      onSelect<span style="color: #009900;">&#40;</span>target, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Selection using the button.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Add a cancel / close button.</span>
  form.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> AjaxButton<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;close&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onSubmit<span style="color: #009900;">&#40;</span>AjaxRequestTarget target, Form form<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      onCancel<span style="color: #009900;">&#40;</span>target<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#91;</span>..<span style="color: #009900;">&#93;</span></pre></div></div>

<p>HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">  &lt;a&gt;Select something&lt;/a&gt; 
&lt;form&gt;
&lt;input type=&quot;button&quot; value=&quot;Select something else&quot; /&gt;
&lt;input type=&quot;button&quot; value=&quot;Close&quot; /&gt;
  &lt;/form&gt;</pre></div></div>

<p>You probably noticed the calls to onSelect() and onCancel(). These are the abstract methods we are declaring:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000066; font-weight: bold;">void</span> onCancel<span style="color: #009900;">&#40;</span>AjaxRequestTarget target<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000066; font-weight: bold;">void</span> onSelect<span style="color: #009900;">&#40;</span>AjaxRequestTarget target, <span style="color: #003399;">String</span> selection<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>These methods are abstract, that way the code that is calling this panel must implement these methods. Because we are calling these methods, this effectively gives the result to the consuming code, without ever knowing what will happen with it.</p>
<p>To use abstract methods, the class itself must be abstract:<br />
public abstract class SelectContentPanel extends Panel</p>
<h3>The Modal Window</h3>
<p>The Modal Window initializes itself with some values. You can just as easily set these values from the calling class, but for now we keep it local.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> SelectModalWindow<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> id<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Set sizes of this ModalWindow. You can also do this from the HomePage</span>
    <span style="color: #666666; font-style: italic;">// but its not a bad idea to set some good default values.</span>
    setInitialWidth<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">450</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    setInitialHeight<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    setTitle<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Select something&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Set the content panel, implementing the abstract methods</span>
    setContent<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> SelectContentPanel<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">getContentId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">void</span> onCancel<span style="color: #009900;">&#40;</span>AjaxRequestTarget target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            SelectModalWindow.<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">onCancel</span><span style="color: #009900;">&#40;</span>target<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">void</span> onSelect<span style="color: #009900;">&#40;</span>AjaxRequestTarget target, <span style="color: #003399;">String</span> selection<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            SelectModalWindow.<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">onSelect</span><span style="color: #009900;">&#40;</span>target, selection<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">  &lt;a&gt;Select something&lt;/a&gt; 
&lt;form&gt;
&lt;input type=&quot;button&quot; value=&quot;Select something else&quot; /&gt;
&lt;input type=&quot;button&quot; value=&quot;Close&quot; /&gt;
  &lt;/form&gt;</pre></div></div>

<p>The setContent() function call is interesting. Here we create a new SelectContentPanel and implement the methods onCancel() and onSelect(). It is possible to do some extra actions here, but here it is passed one-on-one to the abstract methods of the ModalWindow itself:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000066; font-weight: bold;">void</span> onCancel<span style="color: #009900;">&#40;</span>AjaxRequestTarget target<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000066; font-weight: bold;">void</span> onSelect<span style="color: #009900;">&#40;</span>AjaxRequestTarget target, <span style="color: #003399;">String</span> selection<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>The Home Page</h3>
<p>The Home Page itself can now instantiate the ModalWindow, override the methods and do something with the data. One big advantage is that you can see from the HomePage class directly what is going to happen after the user selects something or cancels the action:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">final</span> ModalWindow selectModalWindow <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SelectModalWindow<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;modalwindow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> onSelect<span style="color: #009900;">&#40;</span>AjaxRequestTarget target, <span style="color: #003399;">String</span> selection<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Handle Select action</span>
    resultLabel.<span style="color: #006633;">setModelObject</span><span style="color: #009900;">&#40;</span>selection<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    target.<span style="color: #006633;">addComponent</span><span style="color: #009900;">&#40;</span>resultLabel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    close<span style="color: #009900;">&#40;</span>target<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> onCancel<span style="color: #009900;">&#40;</span>AjaxRequestTarget target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Handle Cancel action</span>
    resultLabel.<span style="color: #006633;">setModelObject</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ModalWindow cancelled.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    target.<span style="color: #006633;">addComponent</span><span style="color: #009900;">&#40;</span>resultLabel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    close<span style="color: #009900;">&#40;</span>target<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
add<span style="color: #009900;">&#40;</span>selectModalWindow<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Further customization</h3>
<p>This example is just passing a String around, you can change it to a more specific class. You can change the onSelect to something more appropriate for your use case. You can even put a Form inside the panel and return the resulting object of the form.</p>
<h3>Download</h3>
<p><a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=L21lZGlhL2NvZGUvZGVtby1yZXVzYWJpbGl0eS56aXA=">Download the complete example project</a> and start experimenting!<br />
(run with mvn jetty:run and connect to http://localhost:8080/demo)</p>
<p>If you think this is useful, please let me know in the comments.</p>
<p>Read the original at <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmwvd2VibG9nLzIwMDgtMDYtMDUvd2lja2V0LWhvdy10by13cml0ZS1hLXJldXNhYmxlLW1vZGFsLXdpbmRvdy1wb3B1cA==">Wicket: how to write a reusable modal window popup</a> or go to the homepage of <a href="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0dXEubmw=">STUQ.nl</a></p>
 <img src="http://stuq.nl/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=68" width="1" height="1" style="display: none;" /><div id="simple_socialmedia"><ul class="ssm_row"><li class="sharetext">Share:</li><li class="twitter"><a target="_blank" href="http://twitter.com/share?url=http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup&amp;text=Wicket: how to write a reusable modal window popup&amp;via=daanvanetten">Tweet</a></li><li class="facebook"><a target="_blank" title="Share on Facebook" rel="nofollow" href="http://www.facebook.com/sharer.php?u=http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup&amp;t=Wicket: how to write a reusable modal window popup">Facebook</a></li><li class="linkedin"><a target="_blank" title="Share on LinkedIn" rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup&amp;title=Wicket: how to write a reusable modal window popup&amp;source=STUQ.nl">LinkedIn</a></li><li class="tumblr"><a target="_blank" title="Share on Tumblr" rel="nofollow" href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fstuq.nl%2Fweblog%2F2008-06-05%2Fwicket-how-to-write-a-reusable-modal-window-popup&name=STUQ.nl&description=Wicket%3A+how+to+write+a+reusable+modal+window+popup" title="Share on Tumblr">Tumblr</a></li><li class="stumble"><a target="_blank" title="Share on StumbleUpon" rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup">Stumble</a></li><li class="digg"><a target="_blank" title="Share on Digg" rel="nofollow" href="http://www.digg.com/submit?phase=2&amp;url=http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup">Digg</a></li><li class="delicious"><a target="_blank" title="Share on Delicious" rel="nofollow" href="http://del.icio.us/post?url=http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup&amp;title=INSERT_TITLE">Delicious</a></li></ul></div>

<br/><br/><p>Related posts:<ul><li><a href='http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup' rel='bookmark' title='Automatically test your Wicket panel HTML markup'>Automatically test your Wicket panel HTML markup</a></li>
<li><a href='http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket' rel='bookmark' title='Create RESTful URLs with Wicket'>Create RESTful URLs with Wicket</a></li>
<li><a href='http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket' rel='bookmark' title='User friendly form validation with Wicket'>User friendly form validation with Wicket</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup/feed</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>

