use of org.activityinfo.client.page.config.form.ProjectForm in project activityinfo by bedatadriven.
the class DbProjectEditor method onEdit.
@Override
protected void onEdit(final ProjectDTO model) {
final FormDialogImpl<ProjectForm> dialog = new FormDialogImpl<ProjectForm>(new ProjectForm());
dialog.setWidth(450);
dialog.setHeight(300);
dialog.getForm().getBinding().bind(model);
dialog.show(new FormDialogCallback() {
@Override
public void onValidated() {
service.execute(RequestChange.update(model, "name", "description"), dialog, new AsyncCallback<VoidResult>() {
@Override
public void onFailure(Throwable caught) {
// handled by monitor
}
@Override
public void onSuccess(VoidResult result) {
dialog.hide();
eventBus.fireEvent(AppEvents.SCHEMA_CHANGED);
view.refresh();
}
});
}
});
}
use of org.activityinfo.client.page.config.form.ProjectForm in project activityinfo by bedatadriven.
the class DbProjectGrid method showAddDialog.
@Override
public FormDialogTether showAddDialog(ProjectDTO project, FormDialogCallback callback) {
ProjectForm form = new ProjectForm();
form.getBinding().bind(project);
FormDialogImpl<ProjectForm> dlg = new FormDialogImpl<ProjectForm>(form);
dlg.setWidth(450);
dlg.setHeight(300);
dlg.setHeading(messages.createProject());
dlg.show(callback);
return dlg;
}
Aggregations