[jboss-user] [JBoss Seam] - Re: two basic questions for EntityHome

azalea do-not-reply at jboss.com
Thu Jul 12 08:02:13 EDT 2007


Hi,

I initialized the EntityHome states in the following code.

  | public class PersonManager extends EntityHome<Person> {
  | 
  | 	... ...
  | 
  | 	@Begin(join=true)
  | 	public void startCreate() {
  | 		debug("startCreate() called: id[#0]", getId());
  | 		setId(null);
  | 		initInstance();
  | 	}
  | 
  | 	@Begin(join=true)
  | 	public void startUpdateOrDelete() {
  | 		debug("startUpdateOrDelete() called: id[#0]", getId());
  | 		initInstance();
  | 	}
  | 
  | 	... ...
  | 
  | }
  | 
If "create" <s:button> in "personList.xhtml" is clicked, startCreate() method is invoked and personEdit.xhtml is rendered.
If "edit" or "delete" <s:link> in personList.xhtml is clicked, the selected personId is bound to #{personManager.id}, startUpdateOrDelete() method is called, and personEdit.xhtml is rendered.

My simple crud app seems to work now.

wschwendt, how about your crud app?



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

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



More information about the jboss-user mailing list