I'm trying to build a application that stores changes in a simplified versioning table
whenever a change is made. To do this I have a seperate versioncontrol table. To do this I
have added a vcUpdate() function to the entityHome class, that stores the state in the
versioning table before calling update:
public String vcUpdate() {
| EntityManager vcEm = this.getEntityManager();
| VcRole vcRole = new VcRole(this.instance, false);
| vcEm.persist(vcRole);
| vcEm.flush();
| return this.update();
| }
But this does not work, as the role I am trying to stored has been changed already. Is
there a way to intercept the form data before it is stored? Obviously I don't want to
save a copy every time somebody starts the editEntity page, as they might close the
session without editing or just press cancel etc.
Is there a better way, has anybody done this?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089450#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...