Does anyone have any thoughts on using XDoclet to generate multiple
<action> elements in struts-config.xml from a single Action class, each
with its own unique set of local forwards?

I've been trying to make this work by simply modifying the template. I
thought I could get it working by adding an additional 'mapping-path'
parameter to my @struts.action-forward elements (and setting its value
equal to the value of the 'path' parameter of the action mapping to
which it should belong.) This effectively maps each of my local forwards
to one of the action mappings defined by a particular @struts.action
tag.

In my template I was using classTagValueMatch to set matchValue to the
path of the current action mapping and then conditionally checking the
'mapping-path' parameter (and only writing out the local forward if it's
'mapping-path' parameter is equal to the 'path' parameter of the current
action mapping). The problem is that setting matchValue with
classTagValueMatch sets the scope of matchValue to the entire class so
it never gets reset (it's always equal to the path parameter of the
first action mapping processed). Subsequently, all generated action
mappings get the set of local forwards mapped to the first action
mapping processed by XDoclet.

Perhaps I'm missing something about how templates are processes by the
XDoclet engine. Or maybe there is another approach to accomplish the
same goal. I'm trying to avoid writing a custom TagsHandler. Any
suggestions will be appreciated.

-Kelly



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to