Results 1 to 3 of 3

Thread: Session scope

Hybrid View

  1. #1

    Default Session scope

    Hello,

    I think it's a very silly question but I can't find an explication.

    I have a multi window application, I have a flow for each window. They are 3 flows. But I need a session scope bean to use in all the flows. It will be loaded in the first flow but it continue in the others.

    Until now, I have created a JSF backing bean, and I define it has session scope.

    Code:
    @Component("storageBBeanSession")
    @Scope("session")
    public class StorageBBean implements Serializable {...}
    But I would like to use the standard web flow style, it would be something like this:
    Code:
    public class StorageBBean implements Serializable {...}
    
    <evaluate expression="action.loadStorage()" result="sessionScope.storageBBean" />
    Thanks in advance!

  2. #2
    Join Date
    Nov 2008
    Posts
    742

    Default

    Are your flows executed as nested subflows, each one calling another? If so, then maybe you can make your bean conversation-scoped instead of session-scoped.

    I don't think you can specify sessionScope like that in your flow definition. However, you should be able to do something like: result="externalContext.sessionMap.storageBBean"

    I don't think you will be able to reference "storageBBean" on its own like this with EL from your flow definition. You would need to address it in the same way that you did when you placed it in the session, through the external context.

  3. #3

    Default

    They are 3 independents flows. They are called with:

    Code:
    <a target="_blank" href="secondFlow" />
    So I will continue using the external context.

    Thank you very much for the answer!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •