You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/06/15 00:46:32 UTC
DO NOT REPLY [Bug 29565] New: -
ActionForm bean should be HAS-A not IS-A
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29565>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29565
ActionForm bean should be HAS-A not IS-A
Summary: ActionForm bean should be HAS-A not IS-A
Product: Struts
Version: 1.1 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Controller
AssignedTo: dev@struts.apache.org
ReportedBy: charles.federspiel@hbo.com
I have a javabean that is distributed with an EJB jar.
It is not extended from org.apache.struts.action.ActionForm, but I would like
struts to populate it's get/sets.
There is no reason struts cannot populate a javabean that is not a subclass of
ActionForm. Struts apps are not further decorated with more struts apps, but
java beans often extend other java beans.
Rather than ActionForms being IS-A, ActionForms should have a getBean method
that returns an object that can then be cast to the type configured in the
struts-config.xml - it should be HAS-A.
When the configured bean is an ActionForm, the getBean method can return 'this'.
This strategy would enable web applications to be more generic between various
jsp modules and ejbs - no ActionForm bean to code in the facade and no request
parameter/field name mapping to code either.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org