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
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to