There is a user object, after user loggined, prodcues a Session scoped user object, the user has List relation, but when I <ui:repeat > to iterate the list,
I got a lazy exception. I think the session scoped bean would detached when it is in a request .
It seems the @conversionScoped @ExtensionManaged entitymanager only can ensure the conversation scope worked well.
How to avoid this exception?
The entityManager used to create the User bean is only going to last for the conversation and thus likely will be gone after login (depending on your configuration)
The way to handle this is to tigger the load of the lasy collection during the login process so that the list is populated before the entity gets detached.
|Retrieving data ...|