Archive for July, 2011

Conversation scope in Wicket using CDI

Tags: , ,

Some time ago I was asked to do some research about integrating Wicket with conversation scope from Context and Dependency Injection (CDI) from JEE6 specification. And as not everything was clear and easy to run, I decided to post my findings in this blog.

Project setup

To make things easier we will base on existing example web application showing how to integrate Wicket with Weld (CDI) from project Seam-Wicket (formerly named weld-wicket). So first let’s pull latest version of Seam-Wicket project from Git:

git clone git://github.com/seam/wicket.git
cd wicket
mvn clean install

and in examples directory there is numberguess Maven project. Just import it into your favourite IDE and execute

mvn install jetty:run -P jetty

Continue reading this post …


Be Sociable, Share!

Wicket Tutorial, part 9 – storing and loading user preferences from cookies

Tags: ,

In the previous post we learnt a few tricks regarding internationalization features in Wicket. Today we will go further and will let application to remember some user preferences using HTTP Cookies. Storing some basic data in cookies is an easy and popular way of letting user customize look and feel of web application he uses very often. Some portals use cookies to render modules in order chosen by user so that most interesting information are in the top.

In our ItemDirectory web application we don’t have (yet!) any sophisticated mechanism which could rely on cookies so we will show how it can be used to store and load language selected by the user.

Continue reading this post …


Be Sociable, Share!