3 Replies Latest reply on Sep 9, 2010 5:13 PM by asiandub

    automatic scope-widening in jsf ?

    nimo22

      I have this:


      @RequestScoped @Named
      public class User implements Serializable{ 
      
      private static final long serialVersionUID = ll;
      
      
      }



      @SessionScoped @Named
      public class MyBean implements Serializable{ 
      
      private static final long serialVersionUID = ll;
      
      
      private @Inject Users u;
      // getter/setter
      
      }




      You see, I inject a (request-scoped) bean into a session-scoped bean.


      Now I want to reference it in JSF:


      Is the lifecycle of this:


      #{user}



      the same as this


      {myBean.user}



      ?


      So the injected user is totally in request-scope, am I right?