Wicket in Action

A comprehensive guide for Java developers building Wicket-based web applications

Wicket and Seam sitting in a tree

Peter Muir of the Seam team has written up an introduction into using Wicket and Seam together.

He starts by stripping JSF support from the default Seam setup (and it never gets uncomfortable writing this down), and adding Wicket specifics to it. Peter starts with a simple Hello, World! page, which has nothing specific to Seam. But then things get interesting with implementing an authentication form using Seam’s bijections.

The code is quite easy to follow (I’ve merged the final resulting form class, and applied a CompoundPropertyModel to save on some code):

public class LoginForm extends Form {
    @In Identity identity;
    @In Credentials credentials;
 
    public LoginForm(String id) {
        super(id, new CompoundPropertyModel(credentials));
        add(new TextField("username"));
        add(new PasswordTextField("password"));
    }
 
    protected void onSubmit() {
        try {
            identity.authenticate();
            setResponsePage(HomePage.class);
        } catch (LoginException e) {
            error("Login failed");                    
        }
    }   
}

This looks very readable. Read more about Wicket and Seam on the Seam Blog.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

With this book, Wicket will become the greatest territory the Dutch have settled since Manhattan.

Nathan Hamblen
Senior Software Engineer, Teachscape Inc.

This is the complete and authoritative guide to Wicket, written and reviewed by the core members of the Apache Wicket team. If there's anything you want to know about Wicket, you are sure to find it in this book.

Jonathan Locke
Founder and Architect of Apache Wicket, Foreword Wicket in Action

Without question, Wicket in Action... is the be-all and end-all when it comes to Wicket.

Geertjan Wielenga, Wicket Netbeans Plugin Author

The tutorial and conversational tone of the writing makes the book very approachable.

Nick Heudecker
System Mobile

Loved the sample application—it tied everything together.

Phil Hanna
Senior Software Developer, SAS Institute

The essential guide for learning and using Wicket.

Erik van Oosten
Lead programmer and Project Manager, JTeam

Finally, the Web Framework of web frameworks, Apache Wicket, now has a bible of its own.

Per Ejeklint
Senior Software Architect, Heimore group

Wicket is an innovative evolution of the MVC programming with simple roots, but without a primer such as this, it can be more challenging than it needs to be.

Brian Topping
Founder, Bill2 Inc.

Wicket In Action glues the areas of web development with Apache Wicket together and gives a great overview of Apache Wicket...it will make a great compendium.

Nino Martinez Wael
Java Specialist, Jayway Denmark