Uploaded image for project: 'Seam Faces'
  1. Seam Faces
  2. SEAMFACES-44

View scope problems, feature needs review

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0.Alpha3
    • Fix Version/s: 3.2.0.Tracking
    • Component/s: None
    • Labels:
      None
    • Environment:
      glassfish v3.0.1

      Description

      1.View scope should behave like normal scope, but client proxies aren't being used.
      2.View scoped beans should be passivation capable, but the container isn't enforcing that.
      3.@ViewScoped annotation cannot be used on producer methods/fields.

      More detailed description is available on a forum:

      http://seamframework.org/Community/SeamfacesViewScopeProblems

        Gliffy Diagrams

          Activity

          Hide
          struberg Mark Struberg added a comment -

          Allow me to disagree. It would not make things easier but would break the EE spec. The @ViewScoped is per the JSF spec backed by the JSF ViewMap. The JSF ViewMap gets serialized into the View with every request. And THAT is what people expect!
          If there is a problem with Serializing Contexts then please fix it! I know there are currently not much tests for serialization in the TCK, but the behaviour of passivating scopes is clearly well defined!

          Please go on and fix all this nasty serialisation problems in the core. You will see that 50++ bugs will silently go away after that...

          Show
          struberg Mark Struberg added a comment - Allow me to disagree. It would not make things easier but would break the EE spec. The @ViewScoped is per the JSF spec backed by the JSF ViewMap. The JSF ViewMap gets serialized into the View with every request. And THAT is what people expect! If there is a problem with Serializing Contexts then please fix it! I know there are currently not much tests for serialization in the TCK, but the behaviour of passivating scopes is clearly well defined! Please go on and fix all this nasty serialisation problems in the core. You will see that 50++ bugs will silently go away after that...
          Hide
          fastroller Andrew Wheeler added a comment -

          To address that problem that "@ViewScoped annotation cannot be used on producer methods/fields" I would suggest introducing a new scope annotation. @ViewScoped is only permitted on types (beans). This is part of the JSF spec and may take a while to get changed. As ViewScoped is effectively a custom scope in seam faces why not control the scope annotation. I would suggest org.jboss.seam.faces.PageScoped to avoid confusion. Perhaps seam could continue to support ViewScoped as an alias to PageScoped on managed beans.

          Show
          fastroller Andrew Wheeler added a comment - To address that problem that "@ViewScoped annotation cannot be used on producer methods/fields" I would suggest introducing a new scope annotation. @ViewScoped is only permitted on types (beans). This is part of the JSF spec and may take a while to get changed. As ViewScoped is effectively a custom scope in seam faces why not control the scope annotation. I would suggest org.jboss.seam.faces.PageScoped to avoid confusion. Perhaps seam could continue to support ViewScoped as an alias to PageScoped on managed beans.
          Hide
          spinner José Freitas added a comment -

          +1 on andrew wheeler comment.

          Show
          spinner José Freitas added a comment - +1 on andrew wheeler comment.
          Hide
          struberg Mark Struberg added a comment -

          I've now created http://java.net/jira/browse/JAVASERVERFACES-2182
          Maybe this gets fixed in the JSF spec somewhen

          Show
          struberg Mark Struberg added a comment - I've now created http://java.net/jira/browse/JAVASERVERFACES-2182 Maybe this gets fixed in the JSF spec somewhen
          Hide
          anadollu sertac anadollu added a comment - - edited

          A quick solution only for using managed persistence with @ViewScope..

          http://seamframework.org/Community/ViewScopedAndSeamManagedPersistence#comment175505

          Show
          anadollu sertac anadollu added a comment - - edited A quick solution only for using managed persistence with @ViewScope.. http://seamframework.org/Community/ViewScopedAndSeamManagedPersistence#comment175505

            People

            • Assignee:
              Unassigned
              Reporter:
              pejovica Aleksandar Pejovic
            • Votes:
              14 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated:

                Development