//item.getTransform().get
Form form = new Form("form");
add(form);
ReprojectTransform reprojectTx =
(ReprojectTransform) item.getTransform().get(ReprojectTransform.class);
reprojectCheckBox = new CheckBox("enableReprojection", new Model(reprojectTx != null));
reprojectCheckBox.add(new AjaxFormComponentUpdatingBehavior("onclick") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
reprojectPanel.setEnabled(reprojectCheckBox.getModelObject());
target.addComponent(reprojectPanel);
}
});
form.add(reprojectCheckBox);
if (reprojectTx == null) {
reprojectTx = new ReprojectTransform(null);
reprojectTx.setSource(item.getLayer().getResource().getNativeCRS());
}
reprojectPanel = new ReprojectionPanel("reprojection", reprojectTx);
reprojectPanel.setOutputMarkupId(true);
reprojectPanel.setEnabled(false);