I think that you have to manage the undo by yourself, because your application knows what changed in its data.
It depends on the things you want undone. If it's about a database, you can always use transactions. If not, you have to make your own mechanism.