I don't know if this would help getting this committed, but using
@struts.form-field tags may be a requirement in order to get POJOs to
generate StrutsForms. With the lastest code, I noticed that
StrutsFormTagsHandler.java is now:
Lines 214-220:
String value = currentTag.getAttributeValue("include-all");
// by default, include all is false
if (value != null && value.equals("true")) {
// includes all persistent fields or fields marked with
@struts.form-field
return (PersistentTagsHandler.isPersistentField(method) ||
method.getDoc().hasTag("struts.form-field"));
}
In the past (the current patched jar I have), I simply commented out the
check for an EJB persistent tag. This is now handled by
PersistentTagsHandler.isPersistentField(method). I'm trying to decide
if I should comment this out for my local patch, or add
@struts.form-field to my method names. This might be a better route as
then I can eliminate certain POJO fields from generated Forms.
Feedback appreciated,
Matt
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Matt Raible
> Sent: Sunday, February 23, 2003 2:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-devel] Generating Struts Forms from POJOs
>
>
> > Why not make your own custom subtask to do this and leave
> the EJB one
> alone?
> >
> > I'd help if I felt this was something I needed, but I don't
> see POJO's
> as the right way to build forms - its not necessarily a
> one-to-one from form to > value object to database.
> >
> > Creating a custom subtask is pretty simple, and you can
> even bundle it
> into a JAR that can be plugged in dynamically. And that JAR
> could be distributed > on your own with the template
> embedded. Also, if you wanted a tag handler you could add a
> custom one in the JAR also.
> >
> > Erik
>
> I agree that it's not 1-1 from form to VO, but neither is
> form -> EntityBean IMO. As far as custom subtasks - is this
> a common practice? In other works, has anyone else done this
> and how does the XDoclet team view this practice. I'm
> guessing I'm responsible for my own distribution, etc. after
> producing it. As for creating this - is it similar to your
> strutsgen tool and associated files?
>
> Thanks,
>
> Matt
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SlickEdit Inc. Develop an
> edge. The most comprehensive and flexible code editor you can
> use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE
> 30-Day Trial. www.slickedit.com/sourceforge
> _______________________________________________
> xdoclet-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
>
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel