public void undoAction(UndoableEvent event) {
FormRepresentation oldForm = (FormRepresentation) event.getData("oldForm");
try {
layoutView.getFormDisplay().populate(oldForm);
} catch (FormBuilderException e) {
bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntPopulateWithForm(), e));
}
}
@Override
public void onEvent(UndoableEvent event) { }
@Override
public void doAction(UndoableEvent event) {
FormRepresentation newForm = (FormRepresentation) event.getData("newForm");
try {
layoutView.getFormDisplay().populate(newForm);
} catch (FormBuilderException e) {
bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntPopulateWithForm(), e));
}
}
}));
}
});