-
Notifications
You must be signed in to change notification settings - Fork 1
Wicket migration code sprint
Getting started: https://dzone.com/refcardz/getting-started-apache-wicket Wicket official docs: https://ci.apache.org/projects/wicket/guide/7.x/guide/single.html
Migration references:
Old branch migrating a 2013 GeoServer towards 6.0 and full diff against its baseline
Justin's previous page Wicket-UI-TODOs on this subject.
Who's working on what https://docs.google.com/spreadsheets/d/1yzE9W4ZaIUcmE1XRcHCTih2mLEhMhVoZxKQl_k1n7D8/edit?ts=569d2137#gid=0
ResourceReference -> PackageResourceReference- ParamResourceModel -> StringResourceModel (the Wicket 7 class is fluent enough that we don't need ParamResourceModel anymore)
PageParameters -> has been moved in a different pakage, the way to fill it is differentAjaxRequestTarget.addComponent --> AjaxRequestTarget.addSimpleAttributeModifier --> AttributeModifier.replace
- Add all missing generics
- Check internationalization (in particular, that params are properly passed down into messages, as a bonus, find a way to check for i18n keys that are no more in use).
- Check that WicketCallback changes did not break the callbacks (some are pretty important)
- Check that the PageParameters migration picked the right
to<TargetType>
vstoOptional<TargetType>
form AbstractValidator is no more there, see the guide on how to implement from interfaceComponent visit has changed, see this bit of the Wicket 1.5 migration guide for reference- IAjaxCallDecorator -> IAjaxCallListener, see the Ajax guide for details
- HeaderContributor has gone. See https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedHeaderContributorandfriends.
Some ideas for making use of Java 8 features when updating wicket code.
Lambda expressions can be automagically for interfaces that have one "abstract" method (ie @FunctionalInterface). This replaces the use of anonymous classes in many wicket examples.
Use of lambda to replace IVisitor:
visitChildren((Component c, final IVisit<Void> visit) -> {
c.setEnabled(enabled);
});
©2020 Open Source Geospatial Foundation