private static final long serialVersionUID = -7834632442532690940L;
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Page createPage() {
return new PolicyModalPage(pageRef, mwindow, policyTO);
}
});
mwindow.show(target);
}
}, ActionLink.ActionType.EDIT, "Policies");
panel.add(new ActionLink() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target) {
try {
policyRestClient.delete(policyTO.getId(), policyTO.getClass());
info(getString(Constants.OPERATION_SUCCEEDED));
} catch (SyncopeClientException e) {
error(getString(Constants.OPERATION_ERROR));
LOG.error("While deleting policy {}({})",
policyTO.getId(), policyTO.getDescription(), e);
}
target.add(container);
((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
}
}, ActionLink.ActionType.DELETE, "Policies");
cellItem.add(panel);
}
});
@SuppressWarnings({ "unchecked", "rawtypes" })
final AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable("datatable", columns,
new PolicyDataProvider(), paginatorRows);
container.add(table);
final AjaxLink<Void> createButton = new ClearIndicatingAjaxLink<Void>("createLink", pageRef) {
private static final long serialVersionUID = -7978723352517770644L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
mwindow.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Page createPage() {
return new PolicyModalPage(pageRef, mwindow, getPolicyTOInstance(policyType));
}
});
mwindow.show(target);
}