@Override
public Page createPage() {
// SYNCOPE-294: re-read userTO before edit
UserTO userTO = restClient.read(model.getObject().getId());
return new EditUserModalPage(page.getPageReference(), editmodal, userTO);
}
});
editmodal.show(target);
}
}, ActionLink.ActionType.EDIT, "Users", "read");
panel.add(new ActionLink() {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target) {
try {
final UserTO userTO = restClient.delete(model.getObject().getId());
page.setModalResult(true);
editmodal.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
return new EditUserModalPage(editmodal, userTO);
}
});
editmodal.show(target);