struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <>
Subject Re: changing ActionForm to be a Java interface
Date Wed, 15 Jan 2003 01:43:03 GMT
This has been discussed before and will not happen for 1.1 and probably not 
until 2.0 if at all.  FYI, I agree with you and am in favor of using more 
interfaces in Struts.  I believe ActionForm was originally designed as a 
class to prevent people from using them as model layer objects.


>From: Dan Jacobs <>
>Reply-To: "Struts Users Mailing List" <>
>Subject: changing ActionForm to be a Java interface
>Date: Tue, 14 Jan 2003 20:36:19 -0500
>  Hi all,
>I know this is very late in the 1.1 game to change things very much, but 
>I'd like to make an API change request.
>Currently, ActionForm is defined as a class rather than as an interface. 
>The problem with that is that it doesn't allow other kinds of objects to 
>act as ActionForms.
>In particular, I want to be able to use JPlates objects (see 
> ) as ActionForms, since that would allow me to 
>encapsulate the full behavior of a form in the object, instead of just 
>having a place to put the data.  I can already use JPlates in place of JSPs 
>for rendering (which is wonderful!), but I'd have a more consistent 
>solution if I could use JPlates objects for my ActionForms as well.
>For the sake of compatibility with existing Struts applications, what I 
>propose is:
>   1. interface IActionForm (yeah, I don't like that convention much
>      either) would define the interface methods.
>   2. class ActionForm implements IActionForm would be used pretty much
>      the way it's used now.
>   3. the internals of Struts would be changed to use IActionForm
>      wherever ActionForm is currently used.
>   4. other kinds of objects could implement IActionForm directly or by
>      delegation to an ActionForm.
>I'd be happy to help out to make this change.
>Dan Jacobs
>President, ModelObjects Group
>Chairman, Boston ACM WebTech Group

Add photos to your e-mail with MSN 8. Get 2 months FREE*.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message