The reset() method is called by the Action before populating an
ActionForm from the request. 

Generally, this should set your properties to their initial values.

It should have already been called by the time Action.perform() is
called. 

It sounds like you are doing the right thing. You should be able to
populate the ActionForm bean in your Action, and then return a forward
to your JSP. 

The only thing I can think of is that it is forwarding to another Action
before it gets to the JSP, or that the ActionForm related to the form in
your JSP is not the same as the one related to the Action.

If the problem persists, you may need to post some code samples. The
description sounds correct.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Smith Chris wrote:
> 
> I am trying to setup an html form that needs to be initially
> populated from a database.  Should I do this in the perform() method
> of the action class (which gets passed the actionform bean), or somewhere in
> the actionform bean??  I'm assuming it should be done from the action class
> since the actionform should just be a data repository by my understanding.
> If so, how do I do this from the action class?  I've tried calling my setter
> methods on the actionform object (after casting to my extended class) from
> within the action class and the form comes up blank.
> 
> If the forms are supposed to be populated from the action classes,
> why is there a reset method in the actionform (which doesn't seem to do
> anything for me by the way -- it never seems to get called), and why is it
> suggested to set the default values from there?
> 
> thank you for any help you can offer.

Reply via email to