struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul McCulloch <>
Subject RE: advice needed: view+form needs data from an action
Date Wed, 28 Jul 2004 12:09:45 GMT
You need to remember the values for your dropdowns between requests if you
don't want to keep asking the database. There are two places you could store
this - in session or in application scope. You need to decide which is more



> -----Original Message-----
> From: alu, artifex []
> Sent: 28 July 2004 12:32
> To: Struts Users Mailing List
> Subject: advice needed: view+form needs data from an action
> i've ran into an problem using struts or, maybe, it's me not 
> understanding the mvc concept correctly:
> the user has to fill out a form which contains several 
> drop-down-boxes 
> filled with possible values from
> a database. so i need an preceding action to gather the data from the 
> database. if the form is submitted
> it's submitted to a different action which should persist the user's 
> inputs. however, if the user enters
> semantically incorrect data he should be redirected back to the input 
> page - loosing the data collected
> from the database in the previous action.
> i suppose there is no way solving this issue using form 
> validation via 
> the validate() method of the actionform.
> another possible way would be that the second action 
> validates the form 
> (which would render the validate
> method of the action form useless in most cases) and, if  the 
> validation 
> fails, gathers the database records
> again and forwards it to the input page. so i'd have to actions doing 
> virtually the same.
> the third way i figured out is to not use pre-populated input 
> pages at 
> all. i could use javascript popups to
> populate certain fields. but i don't want to use popups.
> i'm pretty sure that this is not a uncommon issue and 
> hopefully someone 
> figured out a clever way to deal
> with this problem.
> thanks in advance
> art
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not the addressee
indicated in this message (or responsible for delivery of the message to such person), you
may not copy or deliver this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to Internet email messages
of this kind, please advise us immediately. Opinions, conclusions and other information expressed
in this message are not given or endorsed by my Company or employer unless otherwise indicated
by an authorised representative independent of this message.
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via
electronic mail attachments we cannot guarantee that attachments do not contain computer virus
code.  You are therefore strongly advised to undertake anti virus checks prior to accessing
the attachment to this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for loss or damage
howsoever caused.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message