No, it is a little different.
The user calls Page-A ---> form-A is instantiated --->action-A is run and the execute method is called, prepopulating the drop downs --> the user does stuff and submits --> Validation of form-A fails and does not go to Action-A --> Page-A re-displayed, but with empty drop downs I hope this helps. Steve "Sri Sankaran" <Sri.Sankaran@ To: "Struts Users Mailing List" <[EMAIL PROTECTED]> sas.com> cc: Subject: RE: Please help decide a religious discussion 09/27/2002 09:51 AM Please respond to "Struts Users Mailing List" Wait a minute. Is this the current setup? Action-A (does stuff, preps form-B for page-B) --> Forward to Page-B --> User does stuff and submits --> Validation of form-B fails --> Page-B re-displayed but with empty <select>s? Hard to believe! I say so because the population of the selects is done by the business logic invoked by Action-A which is no longer in the picture. All that your validate should be doing is *test* the data and set ActionErrors if necessary. Make sure you aren't wiping out your collections. Sri -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27, 2002 10:40 AM To: Struts Users Mailing List Subject: Re: Please help decide a religious discussion That is what we are doing now. It goes through a controller to the database, but we are using the validator and when an error occurs, the form does not go to the Action class and the helper methods are not called and as a result, the drop downs are empty. Steve "David Graham" <dgraham1980@ho To: [EMAIL PROTECTED] tmail.com> cc: Subject: Re: Please help decide a religious discussion 09/27/2002 09:17 AM Please respond to "Struts Users Mailing List" The Action class...but the action should be asking a helper object for a list of whatever goes in your drop down. It shouldn't know about the database directly. So you might have in your action.execute(): List list = StateHelper.getStateList(); // put list in your form Dave >From: [EMAIL PROTECTED] >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Subject: Please help decide a religious discussion >Date: Fri, 27 Sep 2002 09:13:35 -0500 > > >All, > >My team is currently at loggerheads about the correct place to put the >database calls that are prepopulating our drop downs. We can not decide >if they should be in the ActionForm or in the Action class. We are >trying to stick them in the validate method in the ActionForm to make >sure they are always called in instances where the form does not get to >the action class (i.e. validation fails). But is this the correct way? >I am thinking this is >nothing new. What is the correct way to initialize drop downs? And then >what about closing the database connection? > >I would much appreciate any help. It would make our Friday alot >smoother. > >Steve > > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>