Skip to content

Wicket migration code sprint

Jody Garnett edited this page Jan 15, 2016 · 28 revisions

References

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.

Semi-automatable Mass changes

  • 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 different
  • AjaxRequestTarget.addComponent --> AjaxRequestTarget.add
  • SimpleAttributeModifier --> AttributeModifier.replace

TODOs

Java 8

Some ideas for making use of Java 8 features when updating wicket code.

Use of lambda to replace IVisitor:

visitChildren((Component c, final IVisit<Void> visit) -> {
   c.setEnabled(enabled);
});
Clone this wiki locally