<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>wicket &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/wicket/</link>
	<description>Feed of posts on WordPress.com tagged "wicket"</description>
	<pubDate>Wed, 25 Nov 2009 03:33:12 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Wicket in OC4J / OracleAS]]></title>
<link>http://webmoli.com/2009/11/22/wicket-in-oc4j-oracleas/</link>
<pubDate>Mon, 23 Nov 2009 03:35:27 +0000</pubDate>
<dc:creator>Venkat</dc:creator>
<guid>http://webmoli.com/2009/11/22/wicket-in-oc4j-oracleas/</guid>
<description><![CDATA[Recently I tried deploying wicket framework based web application in OC4J container it didn&#8217;t ]]></description>
<content:encoded><![CDATA[Recently I tried deploying wicket framework based web application in OC4J container it didn&#8217;t ]]></content:encoded>
</item>
<item>
<title><![CDATA[Unix "PS" command ]]></title>
<link>http://ikennaokpala.wordpress.com/2009/11/18/unix-ps-command/</link>
<pubDate>Wed, 18 Nov 2009 00:45:19 +0000</pubDate>
<dc:creator>IKENNA OKPALA</dc:creator>
<guid>http://ikennaokpala.wordpress.com/2009/11/18/unix-ps-command/</guid>
<description><![CDATA[Today, i meet a senior colleague in the field of software named JOE WALNES. While i was showing Joe ]]></description>
<content:encoded><![CDATA[Today, i meet a senior colleague in the field of software named JOE WALNES. While i was showing Joe ]]></content:encoded>
</item>
<item>
<title><![CDATA[Webclient for SVN, Hudson e Artifactory]]></title>
<link>http://kaosktrl.wordpress.com/2009/11/17/webclient-for-svn-hudson-e-artifactory/</link>
<pubDate>Tue, 17 Nov 2009 22:47:03 +0000</pubDate>
<dc:creator>kaosktrl</dc:creator>
<guid>http://kaosktrl.wordpress.com/2009/11/17/webclient-for-svn-hudson-e-artifactory/</guid>
<description><![CDATA[Salve a tutti, in questi giorni mi sono addentrato ancora nel mondo del continuous integration perch]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Salve a tutti, in questi giorni mi sono addentrato ancora nel mondo del continuous integration perchè sto lavorando su un progetto in Java, gestito in outsourcing, dove aiuto un gruppo di sviluppatori ad utilizzare strumenti di sviluppo che facilitano il lavoro quali un sistema di continuos integration.</p>
<p>Sono partito da un progetto con subversion installato su una macchina e so che nel progetto usano Jboss con JDK 1.5 (ancora non so perchè)</p>
<p>Su un&#8217;altra macchina remota vado e installo JDK 1.5.0.22, Ant 1.7.1, Maven 2.2.1 (fino ad ora (2 mesi di progetto) hanno usato solo Ant e vorrebbero passare a Maven), Jboss 5.1.0, <a href="http://community.polarion.com/index.php?page=overview&#38;project=svnwebclient" target="_blank"><strong>Webclient for SVN 3.1.0</strong></a> e <a href="http://www.jfrog.org/" target="_blank"><strong>Artifactory 2.1.2</strong>.</a></p>
<p>Piccola nota: volevo usare <a href="http://www.sventon.org/" target="_blank"><strong>Sventon</strong></a> ma l&#8217;ultima versione aveva problemi con le librerie e le precedenti mi davano anch&#8217;esse problemi.</p>
<p>Non sapete cosa è Artifactory ??? Allora è possibile che siete ancora freschi su Maven (non è che io non lo sia <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
<p>Artifactory è una applicazione web che permette di gestire repository Maven, sviluppata in Java e rilasciata con licenza LGPL 3.0. L&#8217;applicazione è realizzata da JFrog Ltd, una società privata isreliana.</p>
<p>Strutturalmente si poggia su <a href="http://jackrabbit.apache.org/" target="_blank">Apache Jackrabbit</a> per l&#8217;implemetazione delle specifiche <strong>JSR 170</strong> per il cosiddetto Java Content Repository (anche altri content manager come <a href="http://www.nuxeo.org/xwiki/bin/view/FAQ/Nuxeo52JCR" target="_blank">Nuxeo si appoggiano su Jackrabbit</a>).</p>
<p>Piccola nota: la JSR 170 (rilasciata nel 2005) è seguita dalla <strong>JSR 283</strong> da poco rilasciata (25 Settempre 2009) ed entrambe sono condotte da David Nuescheler, CTO della società svizzera <a href="http://www.day.com/day/en.html" target="_blank">Day Software</a>.</p>
<p>Inoltre Artifactory si basa su <a href="http://lucene.apache.org/java/docs/" target="_blank">Apache Lucene</a> per indicizzare i file e <a href="http://wicket.apache.org/" target="_blank">Apache Wicket</a> per l&#8217;interfaccia utente.</p>
<p>Ora l&#8217;applicazione è rilasciata come standalone ma esiste la versione war che può essere deployata su un application server e quindi l&#8217;ho messa su Jboss insieme ad Hudson e Webclient for SVN (questi 2 li ho poi legati con il <a href="http://wiki.hudson-ci.org/display/HUDSON/Polarion+Plugin" target="_blank">plugin di hudson per Polarion</a> che permette di linkare la lista di file modificati ai file presenti sul webclient e si possono anche vedere le differenze con le versioni precedenti).</p>
<p>La struttura è basata anche su database, di default <a href="http://db.apache.org/derby/" target="_blank">Apache Derby </a>ma che può essere cambiato (vedi anche <a href="http://blog.vinodsingh.com/2009/07/managing-maven-repository-with.html" target="_blank">qui)</a>.</p>
<p>A parte il fatto che Artifactory permette di base <a href="http://wiki.jfrog.org/confluence/display/RTF/Authenticating+with+LDAP" target="_blank">una autenticazione LDAP</a>, quello che lascia senza parole è la semplicità di uso (andrebbe confrontato con <a href="http://nexus.sonatype.org/" target="_blank"><strong>Nexus</strong></a> ma non ne ho tempo, di sicuro nella versione base manca LDAP (anche se ho scoperto di recente che esiste un plugin di terze parti) e di sicuro gli sviluppatori hanno realizzato una bella <a href="http://www.sonatype.com/products/maven/documentation/book-defguide" target="_blank">guida a maven</a> e un <a href="http://m2eclipse.sonatype.org/" target="_blank">plugin per Eclipse</a>). Una volta andato su</p>
<p>http://localhost:8080/artifactory</p>
<p>e loggato, sono andato sul pannello amministrativo e nella sezione repository ho creato un repository locale dove fare il deploy dei propri jar file e un repository virtuale in cui aggiungo quello locale più tutti i remoti quali quello di Maven, Jboss ecc ecc. Fatto ! Ora potete generare anche la sezione del file settings.xml da aggiungere nel vostro progetto Maven.</p>
<p>Per una vecchia guida vi rimando <a href="http://www.theserverside.com/tt/articles/article.tss?l=SettingUpMavenRepository" target="_blank">qui</a>. Per un confronto con Nexus e Archiva vi rimando a questo <a href="http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix" target="_blank">link</a> (attenzione è scritto dallo stesso autore della guida su Artifactory ma sembra serio)</p>
<p>Buon maven a tutti !</p>
<p>Nota: Webclient for SVN si basa su Subversion 1.4 (con versioni successive ho avuto problemi perchè usa un SVNKit vecchio che non posso aggiornare perchè c&#8217;è una particolare classe non più presente nelle ultime versioni), potete trovare Subversion 1.4 qui:</p>
<p>http://downloads-guests.open.collab.net/servlets/ProjectDocumentList?folderID=6</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Force page reload on back/forward button in Firefox 3.x]]></title>
<link>http://notetomys11.wordpress.com/2009/11/16/force-page-reload-on-backforward-button-in-firefox-3-x/</link>
<pubDate>Mon, 16 Nov 2009 15:36:31 +0000</pubDate>
<dc:creator>notetomys11</dc:creator>
<guid>http://notetomys11.wordpress.com/2009/11/16/force-page-reload-on-backforward-button-in-firefox-3-x/</guid>
<description><![CDATA[When using the back/forward buttons in FF3.x, pages are cached and delivered from cache very strictl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>When using the back/forward buttons in FF3.x, pages are cached and delivered from cache very strictly. Obviously (unlike normal caching) even page headers like <code>Pragma</code>, <code>Expires</code> etc. are ignored. This special cache is often referred to as bfcache (back/forward cache).</p>
<p>This behavior caused exceptions in my wicket app, where ajax funtionality is used, here&#8217;s what happens:<br />
 * Load page containing panelA<br />
 * User interaction, replacing panelA with panelB using ajax<br />
 * User clicks back button<br />
 * User clicks forward button<br />
 -&#62; initial page content (markup) is loaded from fbcache, including panelA<br />
 -&#62; in wicket pageMap, panelA is not existent, since it has been replaced with panelB<br />
 * User interacts with an ajax element on panelA<br />
 -&#62; exception is thrown &#8220;Component x not found on page&#8221;</p>
<p>Solution: add an unload handler to the page&#8217;s body tag. This causes firefox to reload the page instead of simply grabbing it from bfcache, so that server and client side state is in sync again <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Forwarding to a URL from Wicket]]></title>
<link>http://mythinkpond.wordpress.com/2009/11/13/forwarding-to-a-url-from-wicket/</link>
<pubDate>Fri, 13 Nov 2009 18:21:56 +0000</pubDate>
<dc:creator>Venkatt Guhesan</dc:creator>
<guid>http://mythinkpond.wordpress.com/2009/11/13/forwarding-to-a-url-from-wicket/</guid>
<description><![CDATA[Sometimes we need to forward to a servlet or resource that&#8217;s outside of Wicket such as a servl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Sometimes we need to forward to a servlet or resource that&#8217;s outside of Wicket such as a servlet. Here&#8217;s how:</p>
<p>1. Modify your web.xml to define your servlet as well as your Wicket application &#8220;ignorePaths&#8221; init-param:</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;!DOCTYPE web-app PUBLIC &#34;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&#34; &#34;http://java.sun.com/dtd/web-app_2_3.dtd&#34;&#62;
&#60;web-app&#62;
 &#60;display-name&#62;Wicket Example&#60;/display-name&#62;
 &#60;filter&#62;
 &#60;filter-name&#62;MyApplication&#60;/filter-name&#62;
 &#60;filter-class&#62;org.apache.wicket.protocol.http.WicketFilter&#60;/filter-class&#62;
 &#60;init-param&#62;
 &#60;param-name&#62;applicationClassName&#60;/param-name&#62;
 &#60;param-value&#62;com.gu.MyApplication&#60;/param-value&#62;
 &#60;/init-param&#62;
 &#60;init-param&#62;
 &#60;param-name&#62;wicket.configuration&#60;/param-name&#62;
 &#60;param-value&#62;deployment&#60;/param-value&#62;
 &#60;/init-param&#62;
 &#60;init-param&#62;
 &#60;param-name&#62;ignorePaths&#60;/param-name&#62;
 &#60;param-value&#62;images/,s/&#60;/param-value&#62;
 &#60;/init-param&#62;
 &#60;/filter&#62;
 &#60;filter-mapping&#62;
 &#60;filter-name&#62;MyApplication&#60;/filter-name&#62;
 &#60;url-pattern&#62;/*&#60;/url-pattern&#62;
 &#60;/filter-mapping&#62;
 &#60;servlet&#62;
 &#60;servlet-name&#62;SomeServlet&#60;/servlet-name&#62;
 &#60;servlet-class&#62;com.gu.SomeServlet&#60;/servlet-class&#62;
 &#60;/servlet&#62;
 &#60;servlet-mapping&#62;
 &#60;servlet-name&#62;SomeServlet&#60;/servlet-name&#62;
 &#60;url-pattern&#62;/s/koolkat.do&#60;/url-pattern&#62;
 &#60;/servlet-mapping&#62;
&#60;/web-app&#62;
</pre>
<p>The first observation is that Wicket is running as a Filter and not a Servlet. Second, the init-param &#8211; &#8220;ignorePaths&#8221; says that anything in the &#8220;/images&#8221; and &#8220;/s/*&#8221; will be ignored by Wicket Filter and passed along downstream.</p>
<p>2. Next in your Wicket Form, within your onSubmit method override you can do the following:</p>
<pre class="brush: java;">
class TestForm extends Form(id){
  @override
  public TestForm(String id, SomeFormModel ghfm)
  {
    //Code removed
  }
  @override
  public onSubmit()
  {
    String url = &#34;/s/koolkat.do&#34;; //some url within the same web-context
    getRequestCycle().setRequestTarget(new RedirectRequestTarget(url));
  }
}
</pre>
<p>Notice that the url field <strong>does not</strong> contain the &#8220;ContextPath&#8221;. Wicket takes care of that in the background. On the other hand, suppose you wanted to redirect to a URL ourside of your web context or to an external site then you would set the variable like this.</p>
<pre class="brush: java;">
String url = &#34;http://mythinkpond.wordpress.com/2009/11/13/forwarding-to-a-url-from-wicket/&#34;;  //or
url = &#34;http://myserver:port/othercontext/someurl&#34;;
</pre>
<p>On some rare occasions, you might want to get the servlet Request Dispatcher to forward a request. For that it gets a little tricky.</p>
<p>&#8211; In your  class you want to grab the &#8220;HttpServletResponse&#8221;. I&#8217;ve been unsuccessful in getting it in the  class.</p>
<pre class="brush: java;">
class xyz extends WebPage{
  public xyz()
  {
     HttpServletResponse response = getWebRequestCycle().getWebResponse().getHttpServletResponse();
     //additional code
     xyxForm thisForm = new xyzForm(thisModel, response);
  }
}

class xyzForm extends Form{
  HttpServletResponse response;

  public xyzForm(xyzModel model, HttpServletResponse thisResponse)
  {
     response = thisResponse;
  }

   public onSubmit() {
     HttpServletRequest request = getWebRequest().getHttpServletRequest();
     //additional code here
     getWebRequest().getHttpServletRequest().getRequestDispatcher(url).forward(request, response);
  }
}
</pre>
<blockquote><p>Please note that the above code is pseudo-code and not actual code because I was writing it in Scala and not Java. But for the audience, I&#8217;m trying to express it in Java so that it can have the greatest impact.</p></blockquote>
<p>That&#8217;s it! Happy Coding!</p>
<blockquote><p>If you find this article useful, consider signing up for my RSS feed or Email Newsletter. See links on the right side.</p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[London Wicket User Group Next meet-up on the 21st of November 2009.]]></title>
<link>http://ikennaokpala.wordpress.com/2009/11/09/london-wicket-user-group-next-meet-up-on-the-21st-of-november/</link>
<pubDate>Mon, 09 Nov 2009 22:16:07 +0000</pubDate>
<dc:creator>IKENNA OKPALA</dc:creator>
<guid>http://ikennaokpala.wordpress.com/2009/11/09/london-wicket-user-group-next-meet-up-on-the-21st-of-november/</guid>
<description><![CDATA[Hi Everyone, The London Wicket User Group has scheduled her next meet-up for 21st of November 2009 a]]></description>
<content:encoded><![CDATA[Hi Everyone, The London Wicket User Group has scheduled her next meet-up for 21st of November 2009 a]]></content:encoded>
</item>
<item>
<title><![CDATA[Exploration des modèles de Wicket]]></title>
<link>http://jawher.wordpress.com/2009/11/08/exploration-des-modeles-de-wicket/</link>
<pubDate>Sun, 08 Nov 2009 00:46:02 +0000</pubDate>
<dc:creator>jawher</dc:creator>
<guid>http://jawher.wordpress.com/2009/11/08/exploration-des-modeles-de-wicket/</guid>
<description><![CDATA[Extrait du synopsis : Cet article a pour objectif de vous présenter la notion de modèles du framewor]]></description>
<content:encoded><![CDATA[Extrait du synopsis : Cet article a pour objectif de vous présenter la notion de modèles du framewor]]></content:encoded>
</item>
<item>
<title><![CDATA[ContextPath in Apache Wicket]]></title>
<link>http://mythinkpond.wordpress.com/2009/11/05/contextpath-in-apache-wicket/</link>
<pubDate>Thu, 05 Nov 2009 17:31:07 +0000</pubDate>
<dc:creator>Venkatt Guhesan</dc:creator>
<guid>http://mythinkpond.wordpress.com/2009/11/05/contextpath-in-apache-wicket/</guid>
<description><![CDATA[One of the first things I found as I was getting familiar with Wicket is how do you point to resourc]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>One of the first things I found as I was getting familiar with Wicket is how do you point to resources that are part of a page. Well I did some digging around to find out so I&#8217;m documenting it here for others who might be facing the same challenges as they discover Apache Wicket.</p>
<p><strong>Problem</strong>:<br />
You have pages in Wicket that are HTML with &#8220;Wicket&#8221; tags. But then you might want to point to resources such as CSS style sheets or JavaScript that&#8217;s part of a page. Here&#8217;s an example of a typical JSP page:</p>
<pre class="brush: xml;">

&#60;html&#62;
&#60;head&#62;
&#60;style type=&#34;text/css&#34; media=&#34;screen&#34;&#62;@import \&#34; + request.getContextPath() + &#34;/styles/site.css\&#34;;&#60;/style&#62;
&#60;/head&#62;
...
</pre>
<p>Well, the above code works when you have a JSP page that gets compiled at run-time before being served. But in the case of Wicket, it does not. So how do you handle such situations?</p>
<p><strong>Solution:</strong></p>
<p><strong>Step-1:</strong> Add &#8220;&#60;wicket:head&#62;&#8221; and &#8220;&#60;/wicket:head&#62;&#8221; between your HTML page like this:</p>
<pre class="brush: xml;">

&#60;html&#62;
&#60;head&#62;
&#60;wicket:head&#62;
&#60;!-- Other existing HTML tags can continue to go here --&#62;
&#60;/wicket:head&#62;
&#60;/head&#62;
...
</pre>
<p><strong>Step-2:</strong> Get the ServletContext and in turn the Context-Path for the web application in your Java/Scala code.</p>
<p>For application servers implementing Servlet 2.5 and above: (Tomcat 6.x implements Servlet 2.5)</p>
<pre class="brush: java;">

ServletContext servletContext = WebApplication.get().getServletContext();
String contextPath = servletContext.getContextPath();
</pre>
<p>For application servers implementing Servlet 2.4: (Tomcat 5.5x implements Servlet 2.4)</p>
<pre class="brush: java;">

String contextPath = getWebRequestCycle().getWebRequest().getHttpServletRequest().getContextPath();
</pre>
<blockquote><p>What&#8217;s the difference? Well, in Servlet 2.5, a new method was added<br />
String javax.servlet.ServletContext.getContextPath()<br />
But if you are deploying your code in an earlier Tomcat or other application servers that do not implement Servlet 2.5, you will be at a disadvantage. So in those cases, use the other approach.
</p></blockquote>
<p><strong>Step-3:</strong> In your Java/Scala Wicket code, just as you add labels or other components to your page you can add the following:</p>
<pre class="brush: java;">

add(new StringHeaderContributor(&#34;&#60;style type=\&#34;text/css\&#34; media=\&#34;screen\&#34;&#62;@import \&#34;&#34; + contextPath + &#34;/styles/site.css\&#34;;&#60;/style&#62;&#34;));
</pre>
<p>So here&#8217;s what happens. In step-2, we created a variable called &#8220;contextPath&#8221; with the Servlet Context Path as it&#8217;s value. And when you add a &#8220;StringHeaderContributor&#8221;, it adds an entry into the pages header. It&#8217;s that simple!</p>
<p>So now after your browser goes through the request you now have the correct &#8220;ContextPath&#8221; inserted into your application:</p>
<pre class="brush: xml;">

&#60;style type=&#34;text/css&#34; media=&#34;screen&#34;&#62;@import &#34;/sampleapp/styles/site.css&#34;;&#60;/style&#62;
</pre>
<p>After I posted the article I noticed I had left out a few additional details on this topic. If you are<br />
adding resources such as images on your page, Wicket provides you with a easy way to do this. There is a org.apache.wicket.markup.html.image.ContextImage class that you can use to create image html tags in your<br />
page.</p>
<p>In your Java or Scala class you can do the following:</p>
<pre class="brush: xml;">

add(new ContextImage(&#34;logo&#34;, contextPath + &#34;/i/logo.jpg&#34;))
</pre>
<p>and in your html (Wicket) page you can add a html-wicket element like this:</p>
<pre class="brush: xml;">

&#60;img wicket:id=&#34;logo&#34;/&#62;
</pre>
<p>Wicket matches the wicket:id &#8220;logo&#8221; with the element added in the code and displays the image with the correct context-path.</p>
<p>&#160;</p>
<blockquote><p>If you find this article useful, consider signing up for my RSS feed or Email Newsletter. See links on the right side.</p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Testing Wicket ListViews using IVisitor]]></title>
<link>http://jugglingbits.wordpress.com/2009/11/05/testing-wicket-listviews-using-ivisitor/</link>
<pubDate>Thu, 05 Nov 2009 10:47:26 +0000</pubDate>
<dc:creator>thomas11</dc:creator>
<guid>http://jugglingbits.wordpress.com/2009/11/05/testing-wicket-listviews-using-ivisitor/</guid>
<description><![CDATA[The standard solution for unit testing Wicket apps is WicketTester. It works fine, but doesn&#8217;t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The standard solution for unit testing Wicket apps is WicketTester. It works fine, but doesn&#8217;t offer much for testing ListViews. The assertListView method lets you test the contents of the ListView, but not the UI.</p>
<p>You can always extract the ListView rows into a Panel, of course. But when you don&#8217;t want to do that for whatever reason, it&#8217;s simple to side-step WicketTester and do the necessary tests yourself, especially since rows that are not in a panel of their own should be pretty simple.</p>
<p>An approach that works well for me is visiting the ListItems using  MarkupContainer.visitChildren() and then accessing their components via Component.get(). To focus on the essential part, I&#8217;m using a method listView() in my example that gets the ListView from the rendered page. Once we have it, we visit its items.</p>
<pre><code>
listView().visitChildren(ListItem.class, new IVisitor&#60;ListItem&#62;()
{
	public Object component(ListItem item)
	{
		Component uri = item.get("uri");
		assertNotNull(uri);
		assertTrue(uri.getClass().isAssignableFrom(ExternalLink.class));

		// etc.

		// If testing one row is enough, we can stop here.
		return IVisitor.STOP_TRAVERSAL;
	}
});
</code></pre>
<p>Once you see it, it&#8217;s trivial. WicketTester&#8217;s assertComponent() isn&#8217;t magic, you can do the same in three lines: get the Component via its path, assert it&#8217;s actually present, and assert it&#8217;s the right type.</p>
<p>If you want to do further tests on the component&#8217;s internals, I find it practical to expose those through package-scoped methods, provided your tests are in the same package than your app.</p>
<p>Finally, something that bit me once: how ListItems work with the list model. Say we have this (just a rough sketch):</p>
<pre><code>
class Foo
{
	List bars;
	List&#60;Bar&#62; getBars() { return bars; }
}

// On some page, the model is a CompoundPropertyModel&#60;Foo&#62;.
add(new ListView&#60;Bar&#62;("bars")
{
	protected void populateItem(final ListItem&#60;Bar&#62; item)
	{
		item.add(new WebMarkupContainer("id"));
	}
});
</code></pre>
<p>If you get hold of the WebMarkupContainer(&#8220;id&#8221;), for instance using an IVisitor like I showed above, and you call getDefaultModelObject() on it, what do you get? One might expect a Bar; after all, it&#8217;s a ListView&#60;Bar&#62;. Not so &#8211; you get a Foo.</p>
<p>ListViews work on the original List instead of a copy. Each ListItem is backed by a ListItemModel, which knows the index of the element it represents, but has no model itself. When the model is looked up, the normal Wicket model chaining happens, so we get to the CompoundPropertyModel. The ListView code of course knows about this and uses the ListItemModel&#8217;s index to get the right Bar from the list. But getDefaultModelObject() doesn&#8217;t know about this and simply returns the Foo.</p>
<p>If you are in that situation, explicitly ask for the ListItemModel:</p>
<pre><code>((ListItemModel) component.getDefaultModel()).getObject()</code></pre>
<p>should give you a Bar. Of course, if you visit the ListItem itself like in the example above instead of a nested component, you can just call getObject() on it and it does the right thing.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[wiQuery]]></title>
<link>http://abderrazakk.wordpress.com/2009/10/18/wiquery/</link>
<pubDate>Sun, 18 Oct 2009 07:34:07 +0000</pubDate>
<dc:creator>Abderrazak</dc:creator>
<guid>http://abderrazakk.wordpress.com/2009/10/18/wiquery/</guid>
<description><![CDATA[Hello, un poste pour vous dire que la milestone 1.1 de la version 1.0 de Wicket / jQuery est désorma]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hello,</p>
<div></div>
<div>un poste pour vous dire que la milestone 1.1 de la version 1.0 de Wicket / jQuery est désormais disponible, vous pouvez la télécharger, l&#8217;utiliser, y contribuer et avoir toutes les ressources nécessaires pour aller plus loin ici : <a href="http://code.google.com/p/wiquery/">je m&#8217;éclate avec wiQuery</a></div>
<div></div>
<div></div>
<div>bon vent !</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Wicket is complicated]]></title>
<link>http://lumpynose.wordpress.com/2009/09/22/wicket-is-complicated/</link>
<pubDate>Tue, 22 Sep 2009 06:35:25 +0000</pubDate>
<dc:creator>Rusty Wright</dc:creator>
<guid>http://lumpynose.wordpress.com/2009/09/22/wicket-is-complicated/</guid>
<description><![CDATA[I‘m beginning to think that the wicket mailing list has more traffic because they need more help. I]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I‘m beginning to think that the wicket mailing list has more traffic because they need more help.</p>
<p>I&#8217;m bothered that their standard idiom for the java class that backs a page does a lot of work in its constructor.</p>
<p>I&#8217;m finding the code examples are invariably hard to understand. For example, this is from one of the constructors from one of their sample apps.  Look at the populateItem method; it receives an item parameter, which it calls getModelObject() on, then it takes the result from that and calls add() on the item parameter to add a Label.  It just seems convoluted.</p>
<pre class="brush: java;">
ListView view = new ListView(&#34;list&#34;, new PropertyModel(this, &#34;results&#34;)) {
    protected void populateItem(ListItem item) {
        String result = (String) item.getModelObject();
        item.add(new Label(&#34;item&#34;, result));
    }
};
</pre>
<p>I still haven&#8217;t figured out how you&#8217;re supposed to handle the non-serializable objects in these page backing classes; e.g., the dao. The page backing classes are serialized and shared across instances in a clustered setup.</p>
<p>Sometimes in the constructor they call methods on the dao.  That just seems wrong. For why, see this article by <a href="http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/">Miško Hevery</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Illustration of Chris's Wicket]]></title>
<link>http://natashasartcandy.com/2009/09/20/illustration-of-chriss-wicket/</link>
<pubDate>Sun, 20 Sep 2009 19:54:11 +0000</pubDate>
<dc:creator>natashawescoat</dc:creator>
<guid>http://natashasartcandy.com/2009/09/20/illustration-of-chriss-wicket/</guid>
<description><![CDATA[On my last visit to Seattle, I was doodling a piece for my friend, Chris Pirillo featuring one of hi]]></description>
<content:encoded><![CDATA[On my last visit to Seattle, I was doodling a piece for my friend, Chris Pirillo featuring one of hi]]></content:encoded>
</item>
<item>
<title><![CDATA[Wicket]]></title>
<link>http://sacrephill.wordpress.com/2009/09/17/wicket/</link>
<pubDate>Thu, 17 Sep 2009 07:40:13 +0000</pubDate>
<dc:creator>Phill</dc:creator>
<guid>http://sacrephill.wordpress.com/2009/09/17/wicket/</guid>
<description><![CDATA[The past few days I&#8217;ve been prototyping for a new project we&#8217;re starting up at work. Pre]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The past few days I&#8217;ve been prototyping for a new project we&#8217;re starting up at work. Previous web projects we&#8217;ve done have mainly been using JSF, however for this project I&#8217;ve been looking into <a href="http://wicket.apache.org/">Apache Wicket</a>.</p>
<p>My first impressions are, I like it. I like it a lot, in fact. It seems to achieve a much more clean separation between code / components and HTML than other frameworks do. It does take a while to get your head around it though &#8211; I&#8217;ve only been working with it for a few days so am still finding my way round!</p>
<p>But I expect I will blog up some info when I&#8217;ve got my head around it.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Wicket enclosures and ajax : no no]]></title>
<link>http://jawher.wordpress.com/2009/09/17/wicket-enclosures-and-ajax-no-no/</link>
<pubDate>Thu, 17 Sep 2009 02:15:37 +0000</pubDate>
<dc:creator>jawher</dc:creator>
<guid>http://jawher.wordpress.com/2009/09/17/wicket-enclosures-and-ajax-no-no/</guid>
<description><![CDATA[Okay, this will be my second post in English, so, don&#8217;t go too hard on me Earlier today, I was]]></description>
<content:encoded><![CDATA[Okay, this will be my second post in English, so, don&#8217;t go too hard on me Earlier today, I was]]></content:encoded>
</item>
<item>
<title><![CDATA[It is getting cold now]]></title>
<link>http://stateofyaone.wordpress.com/2009/09/15/it-is-getting-cold-now/</link>
<pubDate>Tue, 15 Sep 2009 19:20:17 +0000</pubDate>
<dc:creator>stateofyaone</dc:creator>
<guid>http://stateofyaone.wordpress.com/2009/09/15/it-is-getting-cold-now/</guid>
<description><![CDATA[It is starting to cold these days, I think winter is almost here.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It is starting to cold these days, I think winter is almost here.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[“Perfbench” update: Tapestry 5 and Grails]]></title>
<link>http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5-and-grails/</link>
<pubDate>Mon, 14 Sep 2009 16:35:43 +0000</pubDate>
<dc:creator>Peter Thomas</dc:creator>
<guid>http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5-and-grails/</guid>
<description><![CDATA[I attempted to port the Seam “hotel booking” sample to Grails 1.1.1 as well as Tapestry 5.1, to add ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I attempted to port the Seam “hotel booking” sample to <a href="http://grails.org/">Grails</a> 1.1.1 as well as <a href="http://tapestry.apache.org/tapestry5/">Tapestry</a> 5.1, to add to this <a href="http://ptrthomas.wordpress.com/2009/01/14/seam-jsf-vs-wicket-performance-comparison/">head-to-head comparison of Apache Wicket and JBoss Seam</a> done earlier this year.  You can find the code here: [<a href="http://code.google.com/p/perfbench/source/browse/trunk/perfbench">browse</a>] [<a href="http://perfbench.googlecode.com/svn/trunk/perfbench/">SVN</a>]</p>
<p>Here are the relative performance test results (page response time in milliseconds):</p>
<p><a href="http://ptrthomas.wordpress.com/files/2009/09/perf-four.png"><img src="http://ptrthomas.wordpress.com/files/2009/09/perf-four.png?w=300" alt="perf-four" title="perf-four" width="800" class="alignnone size-medium wp-image-509" /></a></p>
<p>Heap-dump comparison for 20 concurrent user / sessions:</p>
<p><img src="http://ptrthomas.wordpress.com/files/2009/09/mem-four.png" alt="mem-four" title="mem-four" width="537" height="116" class="alignnone size-full wp-image-510" /></p>
<p>I&#8217;ll save detailed framework impressions and comparison for a later blog post, and I may need to make updates to the code based on feedback.  Here are some overall observations:</p>
<ul>
<li>Grails was far more productive than Tapestry 5.  This was mainly due to the documentation quality of Grails compared to the scattered and not very well organized Tapestry documentation.</li>
<li>Ease of writing custom tag-libraries is IMO one of the best things about Grails.</li>
<li>The two missing rows in the Tapestry performance test results are because I gave up trying to implement form field validation over Ajax when the user “tabs out”.  Actually I didn’t implement form-field validation at all because I could not figure out how to integrate Hibernate Validator.  Maybe I missed something obvious, do let me know.</li>
<li>Grails still has some way to go in terms of performance.  <a href="http://twitter.com/graemerocher/statuses/3894365607">I am told that</a> significant performance optimizations for GSP will make it into 1.2</li>
<li>Overall, Wicket is fastest, with Tapestry coming a close second.</li>
<li>Wicket also takes up the least amount of heap.  31 MB of the Grails heap alone is taken up by instances of the “groovy.lang.ExpandoMetaClass”.</li>
<li>Session usage of the Seam + JSF combination is significantly higher compared to all the rest, around 760 KB per session.</li>
</ul>
<p><strong>Thoughts on Tapestry 5</strong></p>
<p>I was very interested in seeing if Tapestry 5 lived up to its promise of significantly better performance and scalability – which is known to come at a cost:  a <a href="http://tapestry.apache.org/tapestry5/guide/lifecycle.html">programming model</a> that treats web-pages as static structures that can be &#8220;pooled&#8221;.  One example of what this means is that you can&#8217;t rely on constructors anymore so you now have to figure out other ways of re-initializing your server-state (if applicable) after you are handed an instance from the pool.  The &#8220;magic&#8221; of getting a page from the pool or getting hold of request or session scoped variables is all achieved predictably &#8211; using annotations.  </p>
<p>Another example: due to the way Tapestry does byte-code manipulation – the annotation approach works only for “private” fields and not “protected” ones.  I found this out the hard way, encountering an exception when I tried to extend from an abstract base class and re-use code the “old-fashioned” object-oriented way.</p>
<p>There’s a lot more I can go into, but for now, to summarize my experience as a long-time Wicket user trying out Tapestry 5 &#8211; the top few differences I found are:</p>
<ul>
<li>Having to work around the implications of Tapestry pages being static and &#8220;annotation driven&#8221; programming like I described above.</li>
<li>Tapestry does not have the equivalent of Wicket <a href="http://cwiki.apache.org/WICKET/working-with-wicket-models.html">Model</a>-s which give you fine-grained control over the data you need to render (and bind) within a page and how much of it you decide to persist in the session.  Model-s are certainly the aspect of Wicket that takes the most getting-used-to, but I have a new-found respect for them now after trying Tapestry.</li>
<li>I would rate the Ajax infrastructure of Wicket higher: for example Wicket <a href="http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/">Behavior</a>-s are cleaner compared to Tapestry <a href="http://tapestry.apache.org/tapestry5/guide/mixins.html">Mixin</a>-s, and calling / handling Ajax requests (especially when you depend on server-side state) is far easier.</li>
<li>Tapestry 5 does not have built-in support for web-flow or &#8220;conversation scope&#8221; so I had to write some code to maintain a map of bookings in the session.  BTW I did not have to do this for Grails as I could use <a href="http://grails.org/WebFlow">WebFlow</a>.</li>
</ul>
<p>So coming back to the question, does the “Tapestry way” have a distinct advantage and are the quirks of the programming model worth it?  The opinion of the Tapestry team on this is pretty clear.  Take this quote from the <a href="http://tapestry.apache.org/tapestry5/">Tapestry home page</a> for example:</p>
<blockquote><p>In some Tapestry-like frameworks, such as Faces and Wicket, the page structure is more dynamic, at the cost of storing much, much more data in the HttpSession.</p></blockquote>
<p>Well, looking at the performance comparison results, my personal conclusion is that statements like the above are incorrect.  In fact Tapestry seems to take up more heap space than Wicket for the same functionality.  Also worth noting are the results of running the Wicket application using the <a href="http://wicket.apache.org/docs/1.4/org/apache/wicket/protocol/http/HttpSessionStore.html">HttpSessionStore</a> instead of the default <a href="http://wicket.apache.org/docs/1.4/org/apache/wicket/protocol/http/SecondLevelCacheSessionStore.html">SecondLevelCacheSessionStore</a> + <a href="http://wicket.apache.org/docs/1.4/org/apache/wicket/protocol/http/pagestore/DiskPageStore.html">DiskPageStore</a>:</p>
<p><img src="http://ptrthomas.wordpress.com/files/2009/09/wkt-httpsessionstore.png" alt="wkt-httpsessionstore" title="wkt-httpsessionstore" width="375" height="241" class="alignnone size-full wp-image-511" /></p>
<p>Because this time, Wicket is faster now even for the &#8220;post confirm booking&#8221; page.  This particular action actually ends up displaying 200 items in an HTML table by the end of the test run for 20 concurrent users, since pagination is not being used.</p>
<p>The benchmark has been designed to be easy for you to run once you check-out the code, refer the end of <a href="http://ptrthomas.wordpress.com/2009/01/14/seam-jsf-vs-wicket-performance-comparison/">this blog post</a> for details.  The details of the environment I used for the results posted here are as follows:</p>
<ul>
<li>java.runtime.version : 1.6.0_16-b01</li>
<li>java.vm.name : Java HotSpot(TM) Server VM</li>
<li>java.vendor : Sun Microsystems Inc.</li>
<li>os.name : Windows XP</li>
<li>os.version : 5.1</li>
<li>sun.os.patch.level : Service Pack 3</li>
<li>Intel Core 2 Duo 3.01GHz</li>
<li>3 GB RAM</li>
</ul>
<p>Feel free to post your results or suggest changes to the code.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Wicket Presentation]]></title>
<link>http://lutherbaker.wordpress.com/2009/09/13/wicket-presentation/</link>
<pubDate>Sun, 13 Sep 2009 15:02:55 +0000</pubDate>
<dc:creator>lutherbaker</dc:creator>
<guid>http://lutherbaker.wordpress.com/2009/09/13/wicket-presentation/</guid>
<description><![CDATA[Here are some slides from a Wicket presentation I gave last Thursday night.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Here are some <a href="http://www.slideshare.net/lutherbaker/wicket-1987659">slides</a> from a Wicket presentation I gave last Thursday night.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Using the Wicket Framework to Update style tag.]]></title>
<link>http://ikennaokpala.wordpress.com/2009/09/08/using-the-wicket-framework-to-update-html-style-tag/</link>
<pubDate>Tue, 08 Sep 2009 14:18:00 +0000</pubDate>
<dc:creator>IKENNA OKPALA</dc:creator>
<guid>http://ikennaokpala.wordpress.com/2009/09/08/using-the-wicket-framework-to-update-html-style-tag/</guid>
<description><![CDATA[In this post, Wicket Framework is used to update the embedded style tag. An already working sample c]]></description>
<content:encoded><![CDATA[In this post, Wicket Framework is used to update the embedded style tag. An already working sample c]]></content:encoded>
</item>
<item>
<title><![CDATA[The end of the first week.]]></title>
<link>http://toanunknowngod.wordpress.com/2009/09/07/the-end-of-the-first-week/</link>
<pubDate>Mon, 07 Sep 2009 06:46:34 +0000</pubDate>
<dc:creator>iamnicholas</dc:creator>
<guid>http://toanunknowngod.wordpress.com/2009/09/07/the-end-of-the-first-week/</guid>
<description><![CDATA[It is Sunday night. For those of you keeping score at home, that means I&#8217;ve made it through th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It is Sunday night. For those of you keeping score at home, that means I&#8217;ve made it through the first official week here. Last week, I&#8217;d have to say, didn&#8217;t count. It was full of buying chairs and desks and beds and generally trying to nest. This was the first real week.</p>
<p>Overall, orientation seemed really intense. Firstly, we had a project to complete about ourselves. It was officially the most open-ended project I&#8217;ve ever done. It just said to use an 8.5&#215;11 sheet of paper about yourself. It could be anything. So I stayed up all night designing mine: <br />
<img src="http://lh6.ggpht.com/_6QeVFnj9150/SqSphQXERZI/AAAAAAAAACs/JLKvGqlQtLY/Picture%201.png" /><br />
Needless to say, Kinko&#8217;s messed it up, so it came out looking terrible, although I was really happy with how it looked on screen. So let&#8217;s just pretend that&#8217;s how it came out.</p>
<p>On Monday, we had a full day of orientation, then class with <a href="http://www.amazon.com/Be-Told-Story-Shape-Future/dp/1578569486">Dan Allender</a>, which was, needless to say, intense. I came away feeling like I had gotten hit by a train. A theological train that speaks in stream of consciousness.</p>
<p>Again on Tuesday, we had a long day. Then on Wednesday, we had orientation from 10:30-3, Interpersonal Foundations from 3:30-6, and Hermeneutics from 6-8. It was crazy, but even though I rode my bike 18 miles that day, I came home with enough energy to walk <a href="http://www.facebook.com/wickywak">Wicket</a>. That told me that, rather than being drained by the classes, I was actually energized by what I was learning.</p>
<p>However, I woke up the next day and had a terrible cold.</p>
<p>Go figure.</p>
<p>I&#8217;ve tried to make this weekend as relaxing as possible. On the upside, I&#8217;ve gotten 8 hours of sleep or more for the past 7 days straight. I think that&#8217;s a record for me. Literally.</p>
<p>On the down side, I still don&#8217;t have a job. I interviewed at REI the other day, but it&#8217;s hard to get a seasonal job when you&#8217;re firm on not being able to work during Christmas. So&#8230;there&#8217;s that. We&#8217;ll see if I get a call back. Meanwhile, I think I might just have to suck it up and try to apply to a few Starbucks locations. My roommate Dan has taught me that I&#8217;m not too good for any job. He&#8217;s looking to wash dishes. That&#8217;s awesome.</p>
<p>I&#8217;ve been doing my readings and really enjoying it.</p>
<p>I&#8217;ll check in after I get some seat time in during a real week of classes.</p>
<p>Meanwhile, send me good job-finding energy.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[X factor auditions wales]]></title>
<link>http://atlantaevents.wordpress.com/2009/09/05/x-factor-auditions-wales/</link>
<pubDate>Sat, 05 Sep 2009 20:19:55 +0000</pubDate>
<dc:creator>makingaslash</dc:creator>
<guid>http://atlantaevents.wordpress.com/2009/09/05/x-factor-auditions-wales/</guid>
<description><![CDATA[x factor auditions wales, some good singers there.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>x factor auditions wales, some good singers there.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Grilling tips and techniques]]></title>
<link>http://stateofyaone.wordpress.com/2009/09/05/grilling-tips-and-techniques/</link>
<pubDate>Sat, 05 Sep 2009 17:11:46 +0000</pubDate>
<dc:creator>stateofyaone</dc:creator>
<guid>http://stateofyaone.wordpress.com/2009/09/05/grilling-tips-and-techniques/</guid>
<description><![CDATA[Grilling tips and techniques for holding the best bbq ever?]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Grilling tips and techniques for holding the best bbq ever?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Back to school depression]]></title>
<link>http://stateofyaone.wordpress.com/2009/09/01/back-to-school-depression/</link>
<pubDate>Tue, 01 Sep 2009 20:25:20 +0000</pubDate>
<dc:creator>stateofyaone</dc:creator>
<guid>http://stateofyaone.wordpress.com/2009/09/01/back-to-school-depression/</guid>
<description><![CDATA[Back to school time of the year. Many people are depressed at the idea, kids, teachers and everyone ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Back to school time of the year. Many people are depressed at the idea, kids, teachers and everyone in general.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
