add(new AjaxSubmitLink("synchronize") {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
try {
//AuthenticationKeyFilterPanel.this.updateModel();
AuthenticationKeyFilterConfig config = AuthenticationKeyFilterPanel.this.model.getObject();
getSecurityManager().saveFilter(config);
AuthenticationKeyMapper mapper = (AuthenticationKeyMapper) GeoServerExtensions.bean(config.getAuthKeyMapperName());
mapper.setSecurityManager(getSecurityManager());
mapper.setUserGroupServiceName(config.getUserGroupServiceName());
int numberOfNewKeys=mapper.synchronize();
info(new StringResourceModel("synchronizeSuccessful",AuthenticationKeyFilterPanel.this, null,new Object[] {numberOfNewKeys}).getObject());
}
catch(Exception e) {
error(e);