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/StrutsFormTagsH
andler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/apache/strut
s/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/StrutsFormS
ubTask.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/apache/strut
s/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