Some people use the @struts.form XDoclet tags to create their form classes, although I wasn't able to get it to work with non-EJB classes. I've written an XDoclet extension to create dynamic form bean definitions to get around this.
Your problem is that you're going from HBM > Java Bean > Form Bean, while XDoclet is Java Bean > (HBM, DynaForm Bean Definition). You could hit the HBM files with some XSL to create your form beans, however. Shouldn't be too hard and others may find it useful. On 2004-Apr-23 13:04, Dionisius Purba wrote: > David, It works perfectly fine. > You see, based on, for instance, Person.hbm.xml, > hbm2java will generate Person.java > but since I use struts, I still need to generate PersonForm.java > and Person.jsp > > PersonForm would be very similar to Person.java, with the difference is that > in PersonForm, all fields's type (firstName, lastName, age) > become String. > > Then in the AddPerson.jsp I will have something repeated like this: > <html:text property="firstName"/> > <html:text property="lastName"/> > <html:text property="age"/> > > Is there anyone outthere who makes tool for such thing? > It should not be very difficult to make one, but I just want to avoid > reinvent the wheel. > > regards, > Dion > > -----Original Message----- > From: David Friedman [mailto:[EMAIL PROTECTED] > Sent: Friday, April 23, 2004 1:30 PM > To: Struts Users Mailing List > Subject: RE: generate struts ActionForm & strut's jsp from hibernate's > mapping > > > What's wrong with the hibernate extension tools > and the Code Generator that creates .java files from > the hbm.xml files you give it? > > See: > http://prdownloads.sourceforge.net/hibernate/?sort_by=date&sort=desc > Item: hibernate-extensions-2.1.zip (or the 2.0.2 zip file for 2.0.X > versions) > > I've only used the extension's hbm2java program, not the other way around. > Now that I'm using Xdoclet, I have no further need for those extension > tools. > > Regards, > David > > -----Original Message----- > From: Dionisius Purba [mailto:[EMAIL PROTECTED] > Sent: Friday, April 23, 2004 1:21 AM > To: 'Struts Users Mailing List' > Subject: generate struts ActionForm & strut's jsp from hibernate's > mapping > > > Altough my question is related to hibernate, I hope it's still relevant. > Is anyone aware of tools, open source is better, that can generate > ActionForm and the JSP's (containing struts's HTML Input tag) > based on a hibernate's mapping (i.e. *.hmb.xml)? > > cheers, > dion > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]