[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-28 Thread sjmenden
I fixed it, I changed the Scope on my Group Entity bean to EVENT and I passed the groupId to the showGroup.jsp so the backing bean to that jsp could locate the group. Thanks for all the help guys. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967913#3967913

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-28 Thread sjmenden
And I just removed the @Out annotation to the Group object, but I'm still getting the Detached Exception when trying to persist a group twice. Let me explain what I'm seeing. I click on registerGroup.jsp brings me to a page, I input a name and click register, then I get redirected to a page whic

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-28 Thread sjmenden
I will post my code to satisfy curiosity although there is not much to look at. Using Conversation scope seems very strange to me in this instance. I guess SEAM caters to a whole new realm of patterns that don't exist in the other MVC world. Registering a Group SHOULD be stateless, at least

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-28 Thread bfo81
Not a bill... a bell of course ;). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967779#3967779 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967779 ___ jboss-user mailing l

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-26 Thread bfo81
No, your stateless bean does not keep the group since it's stateless ;). It only knows about the group cause it gets injected. As I said it's quite difficult to GUESS what the problem causes. It would be better to LOOK at your code ;). But I think that you only call new Group(); once. Or you us

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-25 Thread RobJellinghaus
You want to be using conversation scope, not session scope. This is pretty much exactly what conversations are for. The CreateGroup action should have @Begin on the createNewGroup method, and the Group component should be conversation-scoped. The editing actions should all be conversation-sco

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-25 Thread sjmenden
Thank you for the replies, I don't really want to use the other group as a template let me clarify my goals here again: All I want is a simple page that allows a person to register a group, after registering the group, the EJB3 redirects to page that displays that group with links to edit the g

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-25 Thread c_eric_ray
"mrohad" wrote : question regarding PersistenceContextType.EXTENDED | is it possible to explictly deattach the Entities some how? | | I am selecting the entitybeans I want ,then showing them and their relationship entitybeans in a JSF table ,then I would like to store them in a cache and

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-25 Thread bfo81
There's something important I forgot to mention: You might think that a group gets newly created here: @In(create=true) @Out @Valid |private Group group; But that's wrong, it already exists: org.hibernate.PersistentObjectException: DETACHED (!!) entity passed to persist: group

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-25 Thread bfo81
No, he wants to create a new group and uses another group as a template. That's how I understood it (I hope there's no misunderstanding ;)). sjmenden, are you sure you read the thread I posted above? It's very important to understand the 4 states entities can have. If you want to create a new gr

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-24 Thread raja05
"sjmenden" wrote : | I want for the user to register a group, and be redirected to a page which displays that group, and allows the user to modify that group ect., which is why I am outjecting the Group. | This should work with your current code and which I thought was the problem you ment

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-24 Thread sjmenden
I see what I'm doing wrong, but that begs another question, how do I accomplish what I want to accomplish. Shouldn't Registering a Group be stateless? I want for the user to register a group, and be redirected to a page which displays that group, and allows the user to modify that group ect.,

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-24 Thread raja05
sjmenden, try removing the @Out from the group field declaration. What you are doing (after the first time the insert happens) is that you are outjecting that object into the "group" field which gets used by the subsequent jsps. So what you are actually doing is only an update as the first objec

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-24 Thread mrohad
question regarding PersistenceContextType.EXTENDED is it possible to explictly deattach the Entities some how? I am selecting the entitybeans I want ,then showing them and their relationship entitybeans in a JSF table ,then I would like to store them in a cache and deattache them , is it possib

[jboss-user] [JBoss Seam] - Re: Merging objects problems.

2006-08-24 Thread bfo81
em.persist should work. But there are some mistakes in your architecture. If there is a underlying JSF page that uses the "group" component, you need to make the bean a Stateful Bean. Furthermore, the PersistenceContext needs to be EXTENDED. Otherwise the entity will get detached, and that's the