Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3747

Implement new JSF 2.2 ViewScope specification

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0-beta
    • JSR-344
    • None

    Description

      JSF 2.2 spec includes some changes related to view scope behavior:

      • There is a new CDI annotation javax.faces.view.ViewScoped
      • In UIViewRoot.getViewMap() javadoc it says: "... For reasons made clear in ViewScoped, this map must ultimately be stored in the session. For this reason, a true value for the create argument will force the session to be created with a call to ExternalContext.getSession(boolean). "
      • Both @ViewScoped annotations javadoc include this: "... The runtime must ensure that any methods on the bean annotated with PostConstruct or PreDestroy are called when the scope begins and ends, respectively. Two circumstances can cause the scope to end. ..."
      • "... In the session expiration case, the runtime must ensure that FacesContext.getCurrentInstance() returns a valid instance if it is called during the processing of the @PreDestroy annotated method. The set of methods on FacesContext that are valid to call in this circumstance is identical to those documented as "valid to call this method during application startup or shutdown". On the ExternalContext returned from that FacesContext, all of the methods documented as "valid to call this method during application startup or shutdown" are valid to call. In addition, the method ExternalContext.getSessionMap() is also valid to call. ..."

      Attachments

        1. myfaces-api-2.2.0-SNAPSHOT.jar
          1.22 MB
          Leonardo Uribe
        2. myfaces-impl-2.2.0-SNAPSHOT.jar
          2.28 MB
          Leonardo Uribe

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: