8 Replies Latest reply on Apr 1, 2009 4:29 PM by Zahid Maqbool

    Mapping UI Fields directly to Beans, Entity Home

    Zahid Maqbool Newbie

      Hello Everyone,


      I just had a question related to design of an application. What I see from the seam documentation is that there are EntityHomes which provide persist(), update() etc methods and the instance is also available.


      In all the examples, I have seen that the fields in the UI is directly mapped to the instance in the Entityhome


      for example in UI the mappings are {personHome.instance.firstname}


      What I wanted to know is that is this the correct way of doing things when we do actual projects, and what are its benefits.


      Correct me If I am wrong, what I understand is that it is ok to map your User Interface fields directly to the instance and take care of all the validations in the Validation phase of JSF or do Hibernate Validations.


      Please comment on your thoughts on this, because I have been working on some applications where users interface fields where mapped to a form bean and then the form bean was mapped to another Database Bean.



      Thanks in Advance.