Maven Archetypes for Web Applications
This page contains maven archetypes to help you quickly and easily get started on a web project that uses the jetty plugin. Each archetype allows you to generate a template for your project based on the included sample web application. (This supposes that maven 2.x is already installed in your system)
Wicket Web Beans is an Apache Wicket (http://wicket.apache.org) toolkit for JavaBeans. AJAX Web forms are automatically generated from bean properties. The toolkit normally does what you'd expect, but when it doesn't, you can override its behavior.
In this article, after a quick introduction to Wicket, you will learn to obtain and set up the requisite software for Wicket-based web development. Then you will learn to develop interactive web pages using Wicket. Along the way, you will be introduced to some key Wicket concepts.
public class LazyLoad extends WebPage {
public LazyLoad() {
IColumn[] columns = new IColumn[] {
new PropertyColumn(new Model("col1"), "intValue"),
new PropertyColumn(new Model("col2"), "class") };
ISortableDataProvider dataProvider = new SortableDataProvider() {
public int size() {
return 300000;
}
public IModel model(Object object) {
return new Model((Integer) object);
}
public Iterator iterator(int first, int count) {
return loadEntriesFromDatabase(first, count).iterator();
}
private List<Integer> loadEntriesFromDatabase(int first, int count) {
List<Integer> items = new ArrayList<Integer>();
for (int i = 0; i < count; i++) {
items.add(new Integer(first + i));
}
return items;
}
};
DefaultDataTable t = new DefaultDataTable("t", columns, dataProvider, 3);
add(t);
}
}
Qwicket is a quickstart application for the wicket framework. Its intent is to provide a rapid method for creating a new wicket project with the basic infrastructure in place so that you can quickly get to the meat of your application rather than mucking with the plumbing of a wicket application. Currently, the system only supports spring and hibernate built with ant. Future plans include support for maven 2 and other persistence layers such as ibatis.
I want to start using JPA with Wicket, and the quickest way was to start with Qwicket, a project that already has done the heavy lifting. I wanted to be able to build and run my maven-managed application from eclipse. And lastly, I wanted to use MySQL. Qwicket does come with maven support, but it's managed from an ant script. I wanted native maven support. Here's what I did to change qwicket so it fits my requirements: