struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Multi-page form
Date Tue, 10 Oct 2000 17:12:45 GMT
Jason Kitchen wrote:

> > On the other hand, I would also like to have access to the HttpServletRequest in
> > the validate method, in order to have access to other parameters in the request,
> > or, more important, in the session. For example, the validate method could
> > retrieve the locale of the current user in his session and validate dates,
> > currencies, etc. in a locale-dependent way.
> >
> > Craig, is it something you plan to offer in a future release?
>

The current design I am experimenting with gives the validate() method access to the
controller servlet, the mapping that requested this bean (because you might be using the
same bean in more than one action), and the incoming request.  This seems to cover all
the information needs I could think of.


> > >
> > > May be some modifications are required to the API in order to support
> > > this ?
>

Yah, one big one ... ActionForm is going to become a class instead of an interface.  But
then you gain the nice ability to have some default functionality -- for example, you
don't need a new class for a ValidatingActionBean any more; you just skip overriding the
default validate() method which always returns "everything is OK".

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



Mime
View raw message