struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Jacobs <>
Subject changing ActionForm to be a Java interface
Date Wed, 15 Jan 2003 01:36:19 GMT
  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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message