Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

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

scott.stark@jboss.org

2007-07-12


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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.