Using multiple annotations with different action mapping parameters
allows me to use the same implementation code for more than one action
path (e.g. i have single FindByFilter action for retrieving different
types of data - customer, order, product...)

Automatic type recognition by XDoclet just doesn't work well. So I had
to declare manually 'type' attribute for each '@struts.action' tag.
Although that means some "useless" lines of code in my project, it
works.

At first I was a bit confused, because my problem was also connected to
XDoclet JIRA issue
(http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1551) -
duplicate entries generation for inherited classes. 

So, now my problem is solved.

Thank you for your reply...

Cibik


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, May 22, 2007 2:48 PM
To: End-user support for the XDoclet code generator
Subject: Re: [Xdoclet-user] struts-config.xml - incorrect action
typeofinherited actions


Selon Cibulka Jaroslav <[EMAIL PROTECTED]>:

>
> Hi,
Hi
>
> I have problem with type attribute of action in struts-config.xml...
>
> In my application I have the following action class structure:
>
> /**
>  * @struts.action path="/parentAction1" name="ParentForm2"...
>  *
>  * @struts.action path="/parentAction2" name="ParentForm2"...
>  */

2 declarations of struts.action ? Why ?

> public class ParentAction extends Action {}
>
> /**
>  * @struts.action path="/childAction" name="ChildForm"...
>  */
> public class ChildAction extends ParentAction {}
>
>
> The struts-config.xml file generated by XDoclet than looks like this:
>
> <action
>   path="/childAction"
>   type="my.package.action.ChildAction"
>   .../>
>
> <action
>   path="/parentAction1"
>   type="my.package.action.ChildAction"
>   .../>
>
> <action
>   path="/parentAction2"
>   type="my.package.action.ParentAction"
>   .../>
>
>
> Type of parentAction1 is wrongly set as
"my.package.action.ChildAction".
> When I try to get "/parentAction1.do" ChildAction code is executed,
> which usually fail on ClassCastException.
> Have anyone met this problem before?
>
> Thanks,
>
> Jaroslav Cibulka
>
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> xdoclet-user mailing list
> xdoclet-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>



------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to