What do you mean become detached? Detached from what? The session?
Try starting everything from clean (delete cookies and cache from both the
server/client).
Then, when does the MovieC return null for a movie? How does the MovieC and
FavoriteC determine what movie/favorite to return, iow. when/how are they
populated?
Q
On Sat, Aug 22, 2009 at 7:12 PM, measwel <marek_karczewski_at_yahoo.com.au>wrote:
>
> What is actually happening is this:
>
> In the jsp page I have this for the command button to add a favorite:
>
> <h:commandButton id="submit"
> value="Create Favorite"
> rendered="#{true}"
> action="#{FavoriteC.addFavorite}">
> <f:setPropertyActionListener target="#{FavoriteC.movie}"
> value="#{MovieC.movie}" />
> </h:commandButton>
>
> FavoriteC is the Favorite Controller, MovieC is the movie Controller. It
> turns out that MovieC.movie returns null, so he can not set the movie for
> the Favorite. Somehow the movie Controller does no longer return the
> correct
> movie. Perhaps it became detached?
>
> Note: the Movie Controller bean is set to session scope, so it should be
> there as long as the users session is still active.
>
> If so then:
>
> 1) why / when do persistent objects become detached? Is there some kind of
> time limit?
>
> Regards,
> Marek
> --
> View this message in context:
> http://www.nabble.com/JPA-error-tp25092854p25095709.html
> Sent from the java.net - glassfish persistence mailing list archive at
> Nabble.com.
>
>
--
Quintin Beukes