struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Tying Up Loose Ends
Date Mon, 23 Dec 2002 22:31:07 GMT


On Mon, 23 Dec 2002, Peter A. Pilgrim wrote:

> Date: Mon, 23 Dec 2002 22:13:24 +0000
> From: Peter A. Pilgrim <peterp@xenonsoft.demon.co.uk>
> Reply-To: Struts Developers List <struts-dev@jakarta.apache.org>
> To: Struts Developers List <struts-dev@jakarta.apache.org>
> Subject: Re: Tying Up Loose Ends
>
> Craig R. McClanahan wrote:
> > Given a little time to work on Struts (finally), I'd like to tackle the
> > top two bugs (based on severity) in our remaining list:
> >
> > * 14669 -- reset() in DynaActionForm acts the same as in ActionForm
> >
> > * 14800 -- Fix initialization bug and size parameter to form-property
> >
> > What I propose to do for 14669 is based on the patch proposed by Peter
> > Pilgrim, but with the "loaded" property renamed to "cleared" -- for
> > consistency with the method name clear() -- and the "cleared" property
> > stuff being protected instead of public.  For general users of action
> > forms, I don't see why the cleared state would be relevant, although it
> > might to advanced DynaActionForm subclasses.  The clear() methods will, as
> > proposed, be public so that application logic can call them as needed.
> >
>
> Well, Craig, I made it public because may be you want to "clear" the
> attributes back to the default initial values in a action controller.
> I think I am repeated what you just wrote.
>
> When I added the "loaded" / "cleared" attribute I was not sure whether
> to make it `public' or `protected'. I called the attributed "loaded"
> because the DynaActionForm loads the states XML config files. I almost
> called it "configured". Also I assume logically and semantically
> that ` DAF.isLoaded() != DAF.isCleared() '
>

It turns out that I didn't actually need a boolean property at all.  I
just modified the RequestUtils.createActionForm() method to call
initialize() when it created a new form bean instance, so there wasn't any
need for a special flag.  As long as applications use this same factory
method (which is recommended), they won't have to make their custom
reset() methods worry about this either.

I also figured that initialize() was better than clear() because it
corresponded to the "initial" attribute on <form-property> elements.

> --////--
>
> How many bugs are out standing now?
>

14, counting some that are documentation related.

> --
> Peter Pilgrim
> ServerSide Java Specialist
>

Craig


--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message