my $0.02 thought...
Why don't U just inititlaize the form in the ActionHandler?

Uday

-----Original Message-----
From: Open Source [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 11:27 AM
To: [EMAIL PROTECTED]
Subject: Per-Populating Form (Take 2)


Hi All,

I had previously posted a mail about prepopulating the
form before it is presented to the user.

My take on this is :

1.ActionForm will have a method called 
init(HttpServletRequest req).
In this init method we can use any request parameters
to initilize the form the very first time like this

    public void init(ActionMapping mapping ,
HttpServletRequest request)
{
          if (! initialized) {
             doInit(mapping,request);
             initialized = true;
          }
}
doInit() will be app specific method for prepopulating
the form before presenting it to user.

2.Action Servlet will need an extra line to accomodate
this.
In the processPopulate method the last line would be 
formInstance.init(mapping,request)

Does this sound reasonable to folks ?
Or am I being a moron and there is some other way of
acheving this ?

Your suggestions are welcome.

Srikanth

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to