The most used model in Wicket is the PropertyModel and its derivatives. This model allows the user to quickly and easily navigate object graphs using string-based property-path expressions, and is used extensively when displaying data or creating forms.
However, the PropertyModel and its string-based expressions are also responsible for adding the most fragility to Wicket code. The standard Java tooling does not support refactoring strings that happen to contain references to java constructs such as methods or fields; thus errors in these string expressions are not discovered until runtime.
For example, the string used in the code below:
new Label("state", new PropertyModel(personModel, "address.state.code"));
will not be updated by the tooling when the getState() method is renamed into getArea() and will thus cause an error only discoverable at runtime.
So why is PropertyModel used so often in Wicket code even though it causes so many problems? The answer is simple: it is, by far, the easiest and most convenient way to achieve the functionality. We chose to sacrifice robustness of our code for development ease and convenience. What if there was another way to achieve the same, but without using strings?
Read the rest of this entry »
Fellow Apache Wicket committer and TDD enthousiast Timo Rantalaiho discusses how he came to Apache in this Apache 10th anniversary video:
Take a look at his shirt :)
Peter Thomas, renowned for his previous comparisons between web frameworks has put all the popular choices of the moment next to one another in one short article. I haven’t tried the benchmark myself, but I like the results:
Overall, Wicket is fastest, with Tapestry coming a close second.
Read it yourself, and then confirm the results yourself.
The Apache Wicket project is proud to announce the first maintenance release: Apache Wicket 1.4.1. The most notable change in this release is the transparent support for multipart form submissions via Ajax. Wicket is now smart enough to submit a form using a hidden iframe rather then the standard XMLHttpRequest if the form contains file upload fields.
You can download the release here:
http://www.apache.org/dyn/closer.cgi/wicket/1.4.1
Or use this in your Maven pom’s to upgrade to the new version:
<dependency> <groupId>org.apache.wicket</groupId> <artifactId>wicket</artifactId> <version>1.4.1</version> </dependency>
A complete list of changes can be found in our Jira instance.
We thank you for your patience and support.
The Wicket Team
The Apache Wicket project is proud to announce the release of Apache Wicket 1.4. Apache Wicket is an open source, component oriented Java web application framework. With overwhelming support from the user community, this release marks a departure from the past where we leave Java 1.4 behind and we require Java 5 as the minimum JDK version. By moving to Java 5 as the required minimum platform, we were able to utilize Java 5 idioms and increase the type safety of our APIs. Using Java generics you can now write typesafe web applications and create typesafe, self documenting, reusable custom components.
You can download the release here: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
Or use this in your Maven pom’s to upgrade to the new version:
<dependency> <groupid>org.apache.wicket</groupid> <artifactid>wicket</artifactid> <version>1.4.0</version> </dependency>
You will need to upgrade all modules (i.e. wicket, wicket-extensions) to their 1.4 counterparts. It is not possible to mix Wicket 1.3 libraries with 1.4 libraries due to API changes.
From all the changes that went into this release, the following are the most important ones:
Apart from these changes, the release is mostly compatible with Wicket 1.3 and upgrading shouldn’t take too long. Early adopters report about a days work to upgrade medium to large applications to Wicket 1.4. Read the migration guide to learn more about the changes in our APIs. To learn more about all the improvements and new features that went into this release, check the solved issue list in our JIRA instance.
Read the rest of this entry »
The Apache Wicket team is proud to present the release of Apache Wicket 1.3.7. This will be the last feature release for the 1.3.x branch. Going forward, only security fixes will be released in the 1.3.x branch – meaning that 1.3.7 may be the last release in this branch. All users are encouraged to upgrade to 1.4.0 as soon as possible. As work begins on 1.5 in the near future, we will be supporting 1.4.x and 1.5.x.
Eager people click here to download the distribution, others can read the release notes. We thank you for your patience and support.
The Wicket Team
I am very happy to announce that there will be a one day training course at the 2009 ApacheCon conference in Oakland, CA (USA). Before I tell you more about it, consider the following “top ten” list:
Top Ten Reasons You Should Attend ApacheCon US 2009:
10: Hacking is encouraged at the Apache Hackathon two day event.
9: Free beer! http://wiki.apache.org/apachecon/ApacheConUS2009Program
8: Meet members of your favorite projects (i.e. me last year getting Martijn to sign my copy of Wicket in Action: see Martijn signing my book)
7: Free two day BarCamp
6: Free meetups three nights of the week
5: It’s always a good time to visit California: http://oaklandcvb.com/
4: Support the tenth anniversary of the Apache Software Foundation and the many other great projects that will be there.
3: Did I mention FREE BEER?
2: Two attendees in the class will receive FREE copies of Wicket in Action
1: WICKET TRAINING! (more info)
More details will be coming soon, but if you are looking to get your feet wet with Wicket, you should certainly start making plans now to attend the 2009 US ApacheCon, and the Wicket training class that will be held. Those who register early get discounts, too!
The class will consist of fast-moving explanations of core design principles, Wicket components, and “The Wicket Way”, and each section will be followed by a coding practice where you can put into use what you just learned. We will focus on laying a foundation – how to use Wicket, create pages, organize your application, and create a Wicket application.
We will cover the following:
- The fundamentals of Wicket
- Handling data / working with objects and models
- Standard components provided by framework
- Containers / Application / Session / Page
- Effective code reuse strategies
ApacheCon site: http://www.us.apachecon.com
November 2-6, 2009 in Oakland, CA. Classes will be held on Monday and Tuesday. Wednesday through Friday will be for the conference sessions. The Wicket class will be held on Tuesday.
Follow ApacheCon on Twitter: http://twitter.com/apachecon
Manning is celebrating 500 twitter followers with a 50% discount until June 18th: use the coupon code twtr0618 when going through checkout at the Manning online store. This means Wicket in Action for half the price, quite a bargain!
I just performed the 1.2 release of WicketStuff HTML Validator, thanks to Emond Papegaaij, a Topicus Onderwijs co-worker. This new release adds the ability to ignore Wicket specific bugs when using the & entity in JavaScript calls, and adds the ability to ignore <input type=”text” autocomplete=”false” /> validation errors. Even though you specify that your document is (X)HTML compliant, browsers will (fortunately) still work with these validation errors present.
The markup validator was featured in my presentation “Get your Wicket Application in production (and keep your weekends free)”. The validator will notify you if you have invalid HTML markup in your rendered pages. While usually not destructive, having invalid markup can result in long debugging errors when replacing part of your page with for example Ajax, or traversing the DOM.
You can use it by adding the HtmlValidationResponseFilter to the Wicket
request cycle filters in the following fashion:
public class MyApplication extends WebApplication { // ... @Override protected void init() { // only enable the markup filter in DEVELOPMENT mode if(DEVELOPMENT.equals(getConfigurationType())) { HtmlValidationResponseFilter htmlvalidator = new HtmlValidationResponseFilter(); htmlvalidator.setIgnoreAutocomplete(true); htmlvalidator.setIgnoreKnownWicketBugs(true); getRequestCycleSettings() .addResponseFilter(htmlvalidator); } } }
And you’re all set. Make sure you define a XHTML doctype in your pages, such
as:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Foo</title>
</head>
<body>
</body>
</html>To use the HtmlValidator, include the following in your project’s pom:
<dependency> <groupId>org.wicketstuff</groupId> <artifactId>htmlvalidator</artifactId> <version>1.2</version> <scope>test</scope> </dependency>
You might need to add the Wicket Stuff maven repository to your repository list.
I like annotations and loathe oodles of XML. To get Spring and Hibernate work with those nice @Transactional, @Service and @Entity annotations by scanning your classpath, the following Spring configuration files should do the trick for your default Wicket Quickstart project (provided you add the necessary Spring and Hibernate dependencies to your setup). Figuring this out took me an evening (especially getting the scanners and @Transactional support up and running), so here’s my setup such that you don’t have to spend the evening yourself:
Read the rest of this entry »
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