GeoServerAjaxFormLink removeLink = new GeoServerAjaxFormLink("remove") {
@Override
protected void onClick(AjaxRequestTarget target, Form form) {
UniqueResourceIdentifiers identifiers = identifiersModel.getObject();
UniqueResourceIdentifier sdi = (UniqueResourceIdentifier) itemModel
.getObject();
identifiers.remove(sdi);
target.addComponent(container);
}
};
removeFragment.add(removeLink);
return removeFragment;
}
return null;
}
};
identifiers.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance());
identifiers.setPageable(false);
identifiers.setSortable(false);
identifiers.setFilterable(false);
container.add(identifiers);
// add new link button
button = new AjaxButton("addIdentifier") {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
UniqueResourceIdentifiers identifiers = identifiersModel.getObject();
identifiers.add(new UniqueResourceIdentifier());
target.addComponent(container);
}
@Override