2 Replies Latest reply on Apr 8, 2010 8:48 PM by dh2k7

    Must propery names unique?

    dh2k7

      Hello,


      I'm quite new to seam.
      First: It looks really cool :)


      But one question is left at the moment.
      When I annotate fields with @DataModel, @In, ... have their names to be unique application wide?


      If a have:




      @Name("beanA")
      public class BeanA {
        @DataModel 
        private List<User> searchResults;
      }
      
      @Name("beanB")
      public class BeanB {
        @DataModel 
        private List<Product> searchResults;
      }





      And I access

      #{searchResults}

      from a view? Which do I get? How to control this?


      thanks
      Dirk

        • 1. Re: Must propery names unique?
          gaborj

          Hi,


          You should read docs! Probably also about Java Annotation...
          Anyway you have for all this kind:

          @In(value="<nameOfContextVariable>")

          • 2. Re: Must propery names unique?
            dh2k7

            I know, that I can specify the name.
            It seems, as if you say 'yes' ... the name of the context variables have to be unique.


            I've thought that there is a way to use the dot notation {beanA.searchResults} and get the benefits of @DataModel, etc...