Search in sources :

Example 1 with FormDialog

use of org.activityinfo.ui.client.input.view.FormDialog in project activityinfo by bedatadriven.

the class TableToolBar method onEditRecord.

private void onEditRecord(SelectEvent event) {
    Optional<RecordRef> selected = viewModel.getSelectedRecordRef().get();
    if (!selected.isPresent()) {
        return;
    }
    FormDialog dialog = new FormDialog(formStore, selected.get());
    dialog.show();
}
Also used : FormDialog(org.activityinfo.ui.client.input.view.FormDialog) RecordRef(org.activityinfo.model.type.RecordRef)

Example 2 with FormDialog

use of org.activityinfo.ui.client.input.view.FormDialog in project activityinfo by bedatadriven.

the class TableToolBar method onNewRecord.

private void onNewRecord(SelectEvent event) {
    ResourceId newRecordId = ResourceId.generateSubmissionId(viewModel.getFormId());
    RecordRef newRecordRef = new RecordRef(viewModel.getFormId(), newRecordId);
    FormDialog dialog = new FormDialog(formStore, newRecordRef);
    dialog.show();
}
Also used : FormDialog(org.activityinfo.ui.client.input.view.FormDialog) ResourceId(org.activityinfo.model.resource.ResourceId) RecordRef(org.activityinfo.model.type.RecordRef)

Aggregations

RecordRef (org.activityinfo.model.type.RecordRef)2 FormDialog (org.activityinfo.ui.client.input.view.FormDialog)2 ResourceId (org.activityinfo.model.resource.ResourceId)1