[jboss-user] [JBoss Seam] - Re: Problems with list page, persistence, and detached entit

bludginozzie do-not-reply at jboss.com
Sun Jan 20 23:18:23 EST 2008


I find that DataModelSelection stuff really flakey. You could just use tradional JEE development methods for this.  This code should work in any view.

Eg:  In your view;
<s:button action="#{userEdit.remove(user.id)}" value="S. Delete"/>

Then in your action;

  | public void remove(Long id){
  |    User removeUser = (User) em.find(User.class, id);
  |    if (removeUser == null) {
  |       // TODO: Already Deleted!! Someone beat you to it
  |    } else {
  |       log.info("Deleting " +removeUser.getName());	
  |       em.remove(removeUser);
  |       users.remove(removeUser );
  |    }
  | }
  | 

Forgive any typos since I didn't test this code of course.

Good Luck!


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121698#4121698

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



More information about the jboss-user mailing list