What others say:

I enjoyed the training class given for multiple reasons. The first and most important one was flexibility to accommodate requests and include additional topics in the training as per request by our group. I always feel most of the instructors come well-prepared only for the content in the material they bring with themselves and discourage students to go in detail in other topics but it was totally a different experience here which added a lot of value to the whole course. Another one was that he put in effort to understand the layout of our project and gave examples to solve the problems in our project accordingly. Jeremy bring a wide range of topics and have in-depth knowledge of various tools in Web development which have opened paths to new ideas in our project. We also learnt how to efficiently use this framework and use different patterns to achieve that. The hands-on style of training gave a lot of confidence to all. Overall, I would highly recommend Jeremy as a trainer if you are interested in building a web application using Wicket.

Dinesh Kumar
Cisco Systems, Inc.

Dear Jeremy,
I wanted to thank you for your contribution to our environment. Your Java and Wicket training was very informative and robust. Our development team benefited from the way that you customized the training, gearing it towards our applications and architecture.

Our lead developer commented that the hands-on style of your training sessions was particularly powerful and beneficial.

We also are very happy with your consultation related to our existing applications. It helped us greatly improve the performance and management of those applications.

Thanks for your contribution. We look forward to a long-lasting relationship with you.

Regards,
Leo Foley
Chief Information Officer
Systems Material Handling Co

I enjoyed the training class about Wicket done by Jeremy Thomerson. The class was extremely well prepared and well designed, the course material and the labs gave a clear idea of what Wicket is and which advantages this framework brings for software engineers who want to develop a web application.

Antoine Levy-Lambert
Software Engineer
Ariel Partners

Jeremy has helped me out many times when I got stuck with Wicket. There were time when I did not get help with the Wicket forum on Nabbles. I contacted Jeremy and he provided very good solutions. Once I was stuck for more than a month with the most critical part of my application. It was then that I found Jeremy's website. At that time no classes were scheduled to suit me. But I contacted him anyway and he was very kind to provide help and save my application.

Mohammad Salman

Wicket Models

Here are just a few important things you should know about models:

  1. Most components have a backing object of some sort (the string in our text field example) that is contained within the component's model. The generic type (i.e. String in TextField<String>) matches the type of the backing model (i.e. PropertyModel<String>).

  2. These models are stored in the session and managed by Wicket after you create them – just like your components are. They are removed from the session when the page they are contained in is no longer in scope (for example, the user's session has expired, or the page is old and no longer needed).

  3. Because they are stored in the session, you want them to hold the smallest amount of data possible. For instance, a model that retrieves a Person object from the database really doesn't need to hold a reference to the Person object between requests. Instead, if it held only the primary key value for that object, it could re-retrieve it from the database (or second-level cache) on each request, drastically reducing the amount of memory needed to store that page. This becomes especially important when dealing with models that load collections of data.

  4. Models are always “detached” at the end of a request (the detach method is called), giving you the opportunity to nullify any fields within your model that aren't strictly necessary to retain between requests. This helps you save memory and disk space. Models that are passed to any Component's super constructor are automatically detached for you. Any models that you hold as references in private fields or passed as local variables to anonymous inner classes or are not otherwise passed to the Component super constructor should be detached by your own code (within the detach method of your component).

  5. Models can be chained together where one model retrieves data from another model. A good example of this is the built-in PropertyModel class, which takes as its first constructor argument a model that wraps a POJO (which could itself be a LoadableDetachableModel), and then uses the second string argument to retrieve a property (or field) from the object contained within the first model.

  6. Ideally, your Wicket forms and components will deal with models that directly use your domain objects. With Wicket, you don't generally need to create data transfer objects or simple POJOs as an intermediate layer. Instead, your models can deal directly with your domain objects, making it easier to pass these objects to your service layer.