-
1. Re: modifying seam-gen
nimo22 Sep 20, 2008 11:33 AM (in response to socken)You can change your seam-gen easily:
Go to your seam-gen-folder in your seam-distribution:
jboss-seam\seam-gen
and open the file 'build.properties'.
The 'build.properties' will exist after you have made a project-setup with your seam-generator.
Then you have your folder
seam-gen\build-scripts
in which you can change the ant-files to your needs.It s self-explained.
-
2. Re: modifying seam-gen
dan.j.allen Sep 21, 2008 6:04 AM (in response to socken)I wouldn't go so far as to say that it is self-explanatory. However, if you are proficient with builds, then seam-gen should be a walk in the park to hack. The code generation is based on Hibernate reverse engineering tools and Freemarker. Take a look at the seam-gen/view and seam-gen/src directories and try playing with the templates to see what results you get. The possibilities are endless because Hibernate reverse engineering gives you complete access to the entity mappings at an API level.
Don't feel that what seam-gen has today is what you have to go with.
-
3. Re: modifying seam-gen
socken Sep 22, 2008 9:32 AM (in response to socken)Thanks a lot for the answers. The view and src folders look very interesting, looks like you really have a lot of possibilities to modify what is actually being generated.
I never heard of Freemarker, so I'll definitely take a look at that too.The build process itself doesn't look to bad for our purposes, I'm really more interested in changing the output itself, what Java classes are generated etc.
I think a big drawback from seam-gen is, that all elements on the XHTML pages are practically hardcoded and we're looking into using a more generic approach.