Access session scoped bean from request scoped bean

前端 未结 3 581
星月不相逢
星月不相逢 2020-12-10 00:08

I\'m trying to use a pattern found on a IceFaces page.(I\'m not using IceFaces, using PrimeFaces)

In this case I have two beans:

UserController and

3条回答
  •  攒了一身酷
    2020-12-10 00:23

    You might use dependency injection to get the values from that bean with session scope.

    @Inject UserModel user; 
    

    Then you might use this Object in your UserControl bean. By the way you don't need to implement serializable when you are dealing with RequestScope beans.

提交回复
热议问题