2 Replies Latest reply on Aug 3, 2006 4:33 PM by Pete Muir

    Quick question!!!

    Ângelo Luis Newbie

      can i put a @DataModel in a Entity? @OneToMany relashioship???

        • 1. Re: Quick question!!!
          Dave Whittaker Novice

          You could, but I don't think it would make much sense. If you want to outject a @OneToMany collection as a DataModel why don't you create a bean that extracts the collection from the correct entity when it's accessed by your application. Then your new bean can have the extracted collection outjected using @DataModel.

          • 2. Re: Quick question!!!
            Pete Muir Master


            But a UIData backed JSF component (e.g. h:dataTable) can use a list without wrapping (Set's can be used with some conversion). You loose @DataModelSelection (but I've found that if I want that inside an Entity I've made a bad desgin decision ;)