2 Replies Latest reply on Jan 12, 2010 4:23 PM by Dolphin Here

    create CRUD screens

    Dolphin Here Newbie

      Hi Everybody,

      i am not sure if im dreaming something meaningful.

      is that possible to create the CRUD screens for a user defined bean?

      let me explain my understanding.
      with a seam project it is all time possible to create entity beans, related CRUD screens for those beans with validations. now i have a bean which i build over (say that includes list of 3 entity beans) the existing entity beans.
      question now is the possiblity of generating the crud screens for this bean.

      i refer entityname.xhtml, entityname.page.xml as CRUD screen.


        • 1. Re: create CRUD screens
          Jaime Martin Apprentice

          Hi Lakshmi,
          welcome to seam! Yes, it´s true. You´re able to generate CRUD by means of seam-gen as long as you have defined in your database the table/s you need.
          If you define an entity table, and use seam´s seam-gen you may generate the pojo, some java classes that fit seam framework to help you with persistence and list issues, and the CRUD views (xhtml and page.xml files)
          So, a very simple beta version is available with just some clicks (I advise you to have at least a look at chapters 2, 3 and 13 of the reference documentation). Howewer, remember that this generation is not perfect and that probably you´ll have to add code to fullfil your needs or improve the behaviour according to your requirements.
          And remember that seam-gen is just a toy that comes with seam. With seam you´ll be able to do all you´ve said and a lot of things more with a powerful framework.
          Good luck with seam!

          • 2. Re: create CRUD screens
            Dolphin Here Newbie
            Hi Jaime

            yes, a good start with SEAM from my side. coming back to my doubt, yes to some extend im familiar to the default CRUD's (xhtml and page.xml files) that are generated based on the entity. my doubt is i have a new bean built on the exisitng entities and i want to create such files for this bean. is that possible.

            let me put my doutb with an example.

            DB - i have two tables tab1 and tab2.

            so when i generate the pojo i would get




            now my doubt is

            i now create a new bean tabsVo.java

            whose skeleton shall be

            public class tabsVo {
            private List<tab1> t1;
            private List<tab2> t2;

            getter & setters

            is that possible to generate POJO for tabsVo.java  - is my doubt.

            am sorry if i sound stupid. but seriously wanted to know if this can still be possible with SEAM