Search in sources :

Example 1 with InsertRowAuditLogEntry

use of org.drools.workbench.models.guided.dtable.shared.auditlog.InsertRowAuditLogEntry in project drools-wb by kiegroup.

the class GuidedDecisionTablePresenter method onAppendRow.

@Override
public void onAppendRow() {
    if (isReadOnly()) {
        return;
    }
    try {
        synchronizer.appendRow();
        refreshView();
        // Log insertion of row
        model.getAuditLog().add(new InsertRowAuditLogEntry(identity.getIdentifier(), model.getData().size() - 1));
    } catch (VetoException e) {
        getModellerPresenter().getView().showGenericVetoMessage();
    }
}
Also used : InsertRowAuditLogEntry(org.drools.workbench.models.guided.dtable.shared.auditlog.InsertRowAuditLogEntry) VetoException(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer.VetoException)

Example 2 with InsertRowAuditLogEntry

use of org.drools.workbench.models.guided.dtable.shared.auditlog.InsertRowAuditLogEntry in project drools-wb by kiegroup.

the class GuidedDecisionTablePresenter method insertRow.

private void insertRow(final int rowIndex) {
    try {
        synchronizer.insertRow(rowIndex);
        refreshView();
        // Log insertion of row
        model.getAuditLog().add(new InsertRowAuditLogEntry(identity.getIdentifier(), rowIndex));
    } catch (VetoException e) {
        getModellerPresenter().getView().showGenericVetoMessage();
    }
}
Also used : InsertRowAuditLogEntry(org.drools.workbench.models.guided.dtable.shared.auditlog.InsertRowAuditLogEntry) VetoException(org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer.VetoException)

Aggregations

InsertRowAuditLogEntry (org.drools.workbench.models.guided.dtable.shared.auditlog.InsertRowAuditLogEntry)2 VetoException (org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.ModelSynchronizer.VetoException)2