@Override
public void populateItem(final Item<ICellPopulator<ReportExecTO>> cellItem, final String componentId,
final IModel<ReportExecTO> model) {
final ReportExecTO taskExecutionTO = model.getObject();
final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
panel.add(new ActionLink() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target) {
reportExecMessageWin.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
return new ExecMessageModalPage(model.getObject().getMessage());
}
});
reportExecMessageWin.show(target);
}
}, ActionLink.ActionType.EDIT, "Reports", "read", StringUtils.hasText(model.getObject().getMessage()));
panel.add(new ActionLink() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target) {
reportExecExportWin.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
ReportModalPage.this.exportExecId = model.getObject().getId();
return new ReportExecResultDownloadModalPage(reportExecExportWin, ReportModalPage.this
.getPageReference());
}
});
reportExecExportWin.show(target);
}
}, ActionLink.ActionType.EXPORT, "Reports", "read", ReportExecStatus.SUCCESS.name().equals(
model.getObject().getStatus()));
panel.add(new ActionLink() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target) {
try {
restClient.deleteExecution(taskExecutionTO.getId());
reportTO.removeExecution(taskExecutionTO);
info(getString("operation_succeded"));
} catch (SyncopeClientCompositeErrorException scce) {