You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jerald Powel <ge...@yahoo.co.uk> on 2003/11/27 03:07:27 UTC
ActionForms+struts-config
Hi,
Does an ActionForm belong in the struts-config.xml mappings? ie:
<action-mappings>
<action name="MyActionForm"......etc?
Mine is placed here and functions quite well. But is has occurred to me this may be a bad pratcice, as it does not extend Action and is thefore not logically an Action? Or perhaps ActionForm extends Action?
Also, for those using Struts Studio, my ActionForm is in the struts-config as described, and is thus visible in the 'diagram' pane. Is this recommended, or poor pratice?
Thanks for your help
J
---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
Re: ActionForms+struts-config
Posted by Ted Husted <hu...@apache.org>.
The nomenclature here can be confusing. The "name" property doesn't
refer to the Action or the ActionMapping, but to the FormBean "name"
property. Earlier in the configuration file, there is a form-beans
section, and a form-bean element with the name "MyActionForm". This is
the class to which the ActionMapping.name property refers.
This is neither a good nor bad practice. Is the only practice. :)
HTH, Ted.
Jerald Powel wrote:
> Hi,
>
> Does an ActionForm belong in the struts-config.xml mappings? ie:
>
> <action-mappings>
> <action name="MyActionForm"......etc?
>
> Mine is placed here and functions quite well. But is has occurred to me this may be a bad pratcice, as it does not extend Action and is thefore not logically an Action? Or perhaps ActionForm extends Action?
>
> Also, for those using Struts Studio, my ActionForm is in the struts-config as described, and is thus visible in the 'diagram' pane. Is this recommended, or poor pratice?
>
> Thanks for your help
>
> J
>
>
>
>
>
>
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
>
--
Ted Husted,
Junit in Action - <http://www.manning.com/massol/>,
Struts in Action - <http://husted.com/struts/book.html>,
JSP Site Design - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org