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
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
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
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
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
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
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
"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
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
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
"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
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.,
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
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
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
15 matches
Mail list logo