use of org.activityinfo.client.page.config.form.UserForm in project activityinfo by bedatadriven.
the class DbUserEditor method add.
private void add() {
final UserForm form = new UserForm(db);
final FormDialogImpl dlg = new FormDialogImpl(form);
dlg.setHeading(I18N.CONSTANTS.newUser());
dlg.setWidth(400);
dlg.setHeight(300);
final String host = Window.Location.getHostName();
dlg.show(new FormDialogCallback() {
@Override
public void onValidated() {
dispatcher.execute(new UpdateUserPermissions(db, form.getUser(), host), dlg, new AsyncCallback<VoidResult>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(VoidResult result) {
loader.load();
dlg.hide();
}
});
}
});
}
Aggregations