Last week I started migrating an application that used Spring for DI to Google Guice when I stumbled on multibinding.
Since Google Guice 2.0 we can use Multibinding which allows us to bind multiple objects to a collection.
But the one thing I missed in the current release is the ability to bind objects with a specific annotation. So I thought, why not build it myself
Filed under Java | 7 Comments »
Last week I ran into a problem while testing AjaxBehavior in Wicket.
Consider the following scenario: we have a FormComponent which has an AjaxBehavior added to it. We want to test that behavior. Depending on the selected value of for instance a RadioChoice, the Ajaxbehavior should show one component and hide another.
You would think that this would be out of the box behavior when using WicketTester, but unfortunately this is not the case. Triggering an Ajaxbehavior is easy using WicketTester, but setting the selected value isn't. (more...)
Filed under Ajax, Java, Testing, Wicket | 1 Comment »
On our latest project, My colleague Tjeerd Kaastra and I, have been using Wicket.
Since our GUI was so complex, and we had to write 100s of unit tests (a lot of corner cases), we sat down with our testers to find out how we should approach this. Because Our testers use Fitnesse to test both functional acceptance as well as regression tests, they test a lot of the code as well. So we thought, why not integrate the two and that is what we did.
This blog describes how to test Wicket applications using Fitnesse. It is about stretching the limits of the Wicket test components to do so. We will try to explain this by using a small example project we have created to illustrate things. This example project has been inspired on the new user wizard example by Eelco Hillenius. We adapted this example so that it uses Spring, because most apps use a backend system.
Consider the following senario: we want to display some data in a table like manner, and we want it to update when we click on a link or button. We do not want to do a complete page refresh, we want it in an ajax way. Also we would like the modify the css for each cell.
In wicket you can use a ListView iterate over a List of Objects and display them in a table like manner.
This blog describes how you can update ListView data and modify the css for each cell.
(more...)
Today was the last day of the JavaOne Conference. We came to the point when a lot of OutOfMemoryErrors where thrown. We just managed to squeeze in the last sessions.
Today's keynote was all about toys. The guys from the Netbeans team showed some new features such as a JavaScript editor (which contains code completion), Sentilla showed there small sensor thingies, which you can program to gather information, such as acceleration, temperature etc.., LiveScribe showed there very cool pen and lots more.
Today's topic included:
Tags: Java, JavaOne, Semantic Web, SOA
Filed under Java, JavaOne, SOA, Usability | 1 Comment »
Consider the following scenario: we want to have two select boxes and we want to add options from one to the other and back.
Currently, this is not easily possible in Wicket, even though there are a lot of extensions available.
This blog describes an easy way to create a component which does just that!


Filed under Ajax, Java | 3 Comments »
Displaytag is an open source suite of custom tags with which you can easily display a collection of Objects as a table including direct support for paging and sorting. Normally selecting a new page, or sorting the tables leads to a complete page-refresh. It is more user-friendly to refresh only the data in the table using Ajax technology, however Displaytag doesn't offer this out-of-the-box. But we can of course try to add support for this using one of the many Ajax frameworks that are currently available.
A non ajax enabled Displaytag would do a request to a controller for every action such as a sorting or selecting a next page. This would result in a complete page refresh (step 1-8 ). When we Ajax enable the Displaytag we skip the page refresh and only refresh a specific piece of the page using an exposed service which provides the updated HTML fragment (step 1a-8a).
(more...)
Filed under Ajax, Java | 16 Comments »