final List<StatusBean> statuses = new ArrayList<StatusBean>();
final StatusPanel statusPanel = new StatusPanel("statuspanel", userTO, statuses);
form.add(statusPanel);
final AjaxButton disable = new ClearIndicatingAjaxButton("disable",
new ResourceModel("disable", "Disable"), pageRef) {
private static final long serialVersionUID = -958724007591692537L;
@Override
protected void onSubmitInternal(final AjaxRequestTarget target, final Form form) {
try {
userRestClient.suspend(userTO.getId(), statuses);
if (pageRef.getPage() instanceof BasePage) {
((BasePage) pageRef.getPage()).setModalResult(true);
}
window.close(target);
} catch (Exception e) {
LOG.error("Error disabling resources", e);
error(getString("error") + ":" + e.getMessage());
target.add(feedbackPanel);
}
}
@Override
protected void onError(final AjaxRequestTarget target, final Form<?> form) {
target.add(feedbackPanel);
}
};
final AjaxButton enable = new ClearIndicatingAjaxButton("enable",
new ResourceModel("enable", "Enable"), pageRef) {
private static final long serialVersionUID = -958724007591692537L;
@Override