I'm having one issue with using the new code below. The StrutsForm's name's get generated as a full package name, rather than a simple form name. Any ideas how to fix this?
I need to figure out a better way to do this - maybe using Ant. Right now, as soon as I moved all my Forms from the gen directory to the src directory, I had to comment out all the refereces to the gen directory. That's gonna be a pain if I want to generate some forms again. Thanks, Matt > -----Original Message----- > From: Matt Raible [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 23, 2002 11:33 PM > To: '[EMAIL PROTECTED]' > Subject: StrutsForms from POJOs - some success > > > I did a little manipulation tonight of the code and can now > generate a Struts Form from a POJO (i.e. for use with > Hibernate). My hacks are ugly, but they will work for me. I > hope we can figure out a way to retain existing > functionality, but add this functionality to the codebase. I > think the best thing would be use the existing @struts.form > tag, but somehow allow it to be a subtask of many - maybe of > hibernate or something. Right now it still has to be a > subtask of ejb, and I don't know how to allow it as a subtask > of many. I tried to do a "make patch" with TortoiseCVS, but > it just keeps giving me an error. > > Here's the files I changed: > > Index: xdoclet/modules/apache/src/META-INF/xtags.xml > =================================================================== > RCS file: > /cvsroot/xdoclet/xdoclet/modules/apache/src/META-INF/xtags.xml,v > retrieving revision 1.10 > diff -r1.10 xtags.xml > 110a111,113 > > > <condition-parameter>java.lang.Object</condition-parameter> > > </condition> > > <condition type="type"> > 125c128,131 > < > <condition-parameter>javax.ejb.EntityBean"</condition-parameter> > --- > > > <condition-parameter>javax.ejb.EntityBean</condition-parameter> > > </condition> > > <condition type="type"> > > > > <condition-parameter>java.lang.Object</condition-parameter> > 168a175,177 > > </condition> > > <condition type="type"> > > > > <condition-parameter>java.lang.Object</condition-parameter> > > > Index: > xdoclet/modules/apache/src/xdoclet/modules/apache/struts/Strut > sFormTagsHandler.java > =================================================================== > RCS file: > /cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/ap > ache/struts/StrutsFormTagsHandler.java,v > retrieving revision 1.9 > diff -r1.9 StrutsFormTagsHandler.java > 159,160c159,160 > < > !foundFields.containsKey(getCurrentMethod().getName()) && > < > PersistentTagsHandler.isPersistentField(getCurrentMethod()) > --- > > > !foundFields.containsKey(getCurrentMethod().getName()) > > > > //PersistentTagsHandler.isPersistentField(getCurrentMethod()) > > > Index: > xdoclet/modules/apache/src/xdoclet/modules/apache/struts/ejb/S > trutsFormSubTask.java > =================================================================== > RCS file: > /cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/ap > ache/struts/ejb/StrutsFormSubTask.java,v > retrieving revision 1.8 > diff -r1.8 StrutsFormSubTask.java > 53a54 > > addOfType("java.lang.Object"); > > I also have my own template that removes check for > <XDtEjbDataObj:ifIsWithDataContainer>. > > Any advice on a better way of doing this is appreciated. > I've also thought of just generating the XML fragment for a > DynaActionForm from a POJO - that might be a cool way to do > things. It'd be tough to retain validator settings though doing that. > > Thanks, > > Matt > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
