4 Replies Latest reply on Jun 10, 2008 5:11 PM by dhinojosa

    Scope of EntityHome

    kooudy

      Which scope is default for EntityHome components (generated by seam gen)?


      There is @Scope(ScopeType.CONVERSATION) in Home class, is this scope inherited?


      Second question is about generated page for entity.


      If entity has relations to other entities then is tab component rendered on entity page.
      If a tab is selected, then is reloaded entity and selected entity in relation.
      So how entity home know, which entity to load (and subsequent enity in relation)?

        • 1. Re: Scope of EntityHome
          dhinojosa

          Any component installed in components.xml is conversation by default, I assume that would include the EntityHome. If you are extending it the scope would still be conversation if you don't include a @Scope(ScopeType.CONVERSATION).

          • 2. Re: Scope of EntityHome
            dan.j.allen

            > Any component installed in components.xml is conversation by
            > default


            Actually, this is not true. There are default scopes for each of the types. EntityHome is a JavaBean, so the default scope would be EVENT. Excecpt that the parent Home class has a @Scope(CONVERSATION) annotation, which is inherited by any descendant class.


            Your question about tabs is somewhat confusing, so I will try to answer it. The reason Seam knows what entity to load is because the id of the entity is made available on postback due to the fact that  the id is configured as a page parameter. That is, if you are talking about the tabs on the view pages in seam-gen.

            • 3. Re: Scope of EntityHome
              kooudy

              thanks
              that is exactly I wanted
              :)

              • 4. Re: Scope of EntityHome
                dhinojosa

                W00t!  Thanks Dan.