Uploaded image for project: 'MyFaces CODI'
  1. MyFaces CODI
  2. EXTCDI-232

introduce a new RestScope for better GET support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.0.2
    • Core, JEE-JSF20-Module
    • None

    Description

      For pages which are available per GET which uses <f:viewParam /> we often have the problem that @ViewAccessScoped is too aggressive in destroying beans if the >user opens the link in a new tab< (because the first request is done with the window-id of the first tab which causes the destroy of such beans >if< the navigation target is a different page. a custom js triggers a 2nd request with a new window-id to avoid cloning the window, but the first request already triggered the cleanup), but we still need to get new contextual instances once the GET parameters got changed.

      By introducing a new @RestScoped and the respective Context implementation we can provide exactly that. A @RestScoped is a sub-context of @WindowScoped, thus every new browser tab will get a new contextual instance.

      The RestScope is basically a CODI Conversation (1 bean == 1 conversation) very similar to @ViewAccessScoped. The only difference is that those 2 have different expiry calculation mechanism.

      Attachments

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: