Search in sources :

Example 1 with DatabaseForm

use of org.activityinfo.client.page.config.form.DatabaseForm in project activityinfo by bedatadriven.

the class DbListPresenter method onAdd.

public void onAdd() {
    final UserDatabaseDTO db = new UserDatabaseDTO();
    DatabaseForm form = new DatabaseForm(dispatcher);
    form.getBinding().bind(db);
    final FormDialogImpl dialog = new FormDialogImpl(form);
    dialog.setWidth(400);
    dialog.setHeight(200);
    dialog.setHeading(I18N.CONSTANTS.newDatabase());
    dialog.show(new FormDialogCallback() {

        @Override
        public void onValidated() {
            save(db, dialog);
        }
    });
}
Also used : FormDialogImpl(org.activityinfo.client.page.common.dialog.FormDialogImpl) FormDialogCallback(org.activityinfo.client.page.common.dialog.FormDialogCallback) UserDatabaseDTO(org.activityinfo.shared.dto.UserDatabaseDTO) DatabaseForm(org.activityinfo.client.page.config.form.DatabaseForm)

Aggregations

FormDialogCallback (org.activityinfo.client.page.common.dialog.FormDialogCallback)1 FormDialogImpl (org.activityinfo.client.page.common.dialog.FormDialogImpl)1 DatabaseForm (org.activityinfo.client.page.config.form.DatabaseForm)1 UserDatabaseDTO (org.activityinfo.shared.dto.UserDatabaseDTO)1