[jboss-user] [JBoss Seam] - Intercept form data for versioning

bonf do-not-reply at jboss.com
Thu Sep 27 14:55:20 EDT 2007


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#4089450

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089450



More information about the jboss-user mailing list