struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <j...@wendysmoak.com>
Subject Re: Prepopulating Form elements in ActionForms
Date Thu, 10 Mar 2005 20:18:32 GMT
From: "Greg Pelly" <gpelly@esri.com>

> I am having trouble with the ActionForm reset() method. I am using the
> method to handle prepopulating form values.

The reset method gets called every time the form is populated from the
request params.  You typically only want to prepopulate a form once, just
before it is displayed for the first time.

Pre-population is usually done from the Action, not within the form itself.

It *is* necessary to set all checkboxes to false in reset, but that's not
prepopulating them, that's clearing them out so the framework can set them
properly from the contents of the request.

-- 
Wendy Smoak


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message