use of org.openremote.app.client.admin.users.AdminUsersPlace in project openremote by openremote.
the class AdminUserEditActivity method delete.
@Override
public void delete() {
adminContent.showConfirmation(environment.getMessages().confirmation(), environment.getMessages().confirmationDelete(user.getUsername()), () -> {
adminContent.setFormBusy(true);
adminContent.clearFormMessages();
clearViewFieldErrors();
environment.getApp().getRequests().send(requestParams -> userResource.delete(requestParams, realm, userId), 204, () -> {
adminContent.setFormBusy(false);
environment.getEventBus().dispatch(new ShowSuccessEvent(environment.getMessages().userDeleted(user.getUsername())));
environment.getPlaceController().goTo(new AdminUsersPlace(realm));
});
});
}
use of org.openremote.app.client.admin.users.AdminUsersPlace in project openremote by openremote.
the class AdminUserEditActivity method create.
@Override
public void create() {
adminContent.setFormBusy(true);
adminContent.clearFormMessages();
clearViewFieldErrors();
readFromView();
environment.getApp().getRequests().sendWith(userMapper, requestParams -> userResource.create(requestParams, realm, user), 204, () -> {
adminContent.setFormBusy(false);
environment.getEventBus().dispatch(new ShowSuccessEvent(environment.getMessages().userCreated(user.getUsername())));
environment.getPlaceController().goTo(new AdminUsersPlace(realm));
}, validationErrorHandler);
}
Aggregations