Hey
I've stumbled on a little problem while doing the WebWork view
configuration file with XDoclet. The problem is the following:
The generation of the configuration is done by utilizing both method
level and class level tags at the same time. For example, the following
code may be used:
/**
* @webwork:action name="foo" success="foo.jsp"
*/
public class Foo
extends ActionSupport
{
..
/**
* @webwork:command name="bar" success="bar.jsp"
*/
public String doBar()
{
..
}
}
--
This should generate the following views.properties
foo.action=Foo
foo.success=foo.jsp
foo.bar.action=Foo!bar
foo.bar.success=bar.jsp
This is done in the .j file by iterating over the command tags for each
method and within that iterating over each action tag for the class.
Since these both XDoclet template tags (forAllMethodTags and
forAllClassTags) both use setCurrentTag they will interfere with each
other. For some strange reason this actually works when there is only
one command for a method (intuitively I thought it would crash even
there but it doesn't). The problem arises when one tries to define two
commands for a method (the common reason being that the same command
should be used with two different sets of result views).
One way to deal with this is to extend getCurrentTag/setCurrentTag to
include the FOR_TYPE so that one can distinguish between
class/field/constructor/method tags.
What say ye?
/Rickard
--
Rickard �berg
Author of "Mastering RMI"
Chief Architect, TheServerSide.com
The Middleware Company - We Build Experts!
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel