Hey you all, 
i solved my problem you were right bfo81. i had to use the conversation scope 
for my component and its member ( @Out(scope=ScopeType.CONVERSATION)


  | @Stateful
  | @Name("clientPersonAction")
  | @Scope(ScopeType.CONVERSATION)
  | public class ClientPersonEditAction implements ClientPersonEdit{
  |     
  |     @PersistenceContext
  |     private EntityManager em;
  |     
  |     @RequestParameter()
  |     private Long clientPersonId;
  |     
  |     @In(required=false) 
  |     @Out(scope=ScopeType.CONVERSATION,required=false)
  |     private ClientPerson newClientPerson;
  |     
  |     @Begin(join=true) 
  |     @Factory("newClientPerson")
  |     public void createNewClientPerson()
  |     {
  |             if(clientPersonId != null)
  |             {
  |                     ClientPersonDAO clientPersonDAO = new 
ClientPersonDAO(em);
  |                     newClientPerson = 
clientPersonDAO.getClientPersonById(clientPersonId);
  |                     System.out.println("createNewClientPerson:" + 
newClientPerson.getId());
  |             }
  |             else
  |             {
  |                     newClientPerson = new ClientPerson();
  |             }
  |     }
  |     
  |     @End
  |     public String saveClientPerson() {
  |             ClientPersonDAO clientPersonDAO = new ClientPersonDAO(em);
  |             System.out.println("newClientPerson.getId():" + 
newClientPerson.getId());
  |             clientPersonDAO.merge(newClientPerson);
  |             return "home";
  |     }
  |     
  |     @Destroy @Remove 
  |     public void detroy()
  |     {
  |     }
  | 
  |     @End
  |     public String removeClientPerson() {
  |             ClientPersonDAO clientPersonDAO = new ClientPersonDAO(em);
  |             clientPersonDAO.remove(newClientPerson);
  |             return "home";
  |     }
  | 
  | }anonymous wrote : 
  |   | 
  |   | 
  |   | Thats the problem when you come from other webframeworks. Everybody has 
their own name for scopes and ways to store information in the session.
  |   | 
  |   | Its a little bit confusing that every entity, component and their 
members can have other scopes.
  |   | 
  |   | thanks
  |   | 
  |   | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960605
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to