}
});
}
Link editLink(final LayerSummary layerSummary) {
Link link = new Link("edit") {
@Override
public void onClick() {
Page p = new ResourceConfigurationPage(layerSummary.getLayer(), true) {
@Override
protected void onSuccessfulSave() {
setResponsePage(ImportSummaryPage.this);
layerSummary.setStatus(ImportStatus.SUCCESS);
}
@Override
protected void onCancel() {
setResponsePage(ImportSummaryPage.this);
}
};
setResponsePage(p);
}
};
// keep the last modified name if possible
String name;
if(layerSummary.getLayer() != null)
name = layerSummary.getLayer().getName();
else
name = layerSummary.getLayerName();
link.add(new Label("name", name));
// also set a tooltip explaining what this action does
link.add(new AttributeModifier("title", true, new ParamResourceModel("edit", this, name)));
return link;
}