Excerpt |
---|
1.4 is the current development release. |
Migrating to Wicket 1.4
...
Note | ||
---|---|---|
| ||
http://wicket.apache.org/building-from-svn.html describes how to get and build Wicket 1.4.x. Snapshots can be found in this maven repository and has version 1.4-SNAPSHOT: |
Panel | ||||
---|---|---|---|---|
| ||||
|
Environment
...
- Wicket 1.4 requires at least Java 5
...
Minimum Java version is now 1.5.
...
Model changes
Component.getModel() and friends renamed to getDefaultModel() and friends
The biggest API break is to the getModel() method. In 1.3, Component had a method getModel() that returned the model object of the default model of the component. This was renamed to getDefaultModel(), as well as it's supporting methods (i.e. getDefaultModelObject() and getDefaultModelObjectAsString()). This method returns IModel<?>. This change was made as part of the 1.4-M3 release. In the M1 and M2 releases, getModel() returned IModel<T> because Component had the generic type T. In M3 and subsequent releases, only certain components (including FormComponent and all subclasses, as well as Link and several other core components) were genericized. This included defining them as ComponentName<T> and including a getModel() method that returned IModel<T>.
...
NumberValidator has been deprecated and broken into three more generic validators: RangeValidator, MinimumValidator, MaximumValidator. Likewise, the corresponding resource keys have also been changed (eg NumberValidator.maximum resource key has become MaximumValidator). NumberValidator.POSITIVE and NEGATIVE have been deprecated without a replacement, they were too confusing to the users with regard to whether or not they included zero - the same result can be easily reproduced by either Minimum or MaximumValidator.
Configuration type variable name change
Wicket 1.4 uses wicket.configuration instead of configuration context variable in web.xml to declare configuration type. This is done to avoid collissions with other frameworks. configuration variable is still supported, but may be removed in a future release.