As you might know, I'm trying to generate StrutsForms and POJOs for Hibernate from the same class. I'm having minimal luck and about ready to throw it out the window. A couple of problems:
1. I have to use an EntityBean in order to generate the StrutsForm.
2. I have to generate a VO for Hibernate to work, as an EntityBean cannot be instantiated using new EntityBean();
3. The VO only generates methods for getters/setters. I need an addResume method on my User object in order to associate the two.
Am I a fool in trying to do something like this? It seems so - as I just feel like I'm fighting with Xdoclet and Hibernate at this point - without really accomplishing anything. I think the ideal situation is thus:
1. Mark up a POJO with Hibernate and Struts Tags.
2. The POJO will be used by Hibernate as and there will be no additional class generated.
2. The StrutsForm can be generated from this POJO.
So since I *really* want to implement this functionality - where do I dig in and make it possible? Here's an initial stab at it:
1. Make the strutsform a possible subtask of hibernate doclet, or possibly webdoclet. Basically, allow it to be run on a POJO rather than an EntityBean only.
2. Make the @struts.form related tags not depend on @ejb tags.
Furthermore, it would be great to be able to indicate which getter/setters get used for Hibernate, and which ones get used for Struts. This might be possible using the @struts.form-field tag. I tried playing with it a little and it seemed that the only way to make it work was to put a @struts.form name="" and then @struts.form form-name="" - otherwise they wouldn't generate.
Any advice would be great. I'm trying to get this done ASAP, and I'm way over my head here - but I don't want to resort to writing a ValidatorForm and POJO by hand. I will if I have to, but I'd rather extend Xdoclet.
Thanks,
Matt
