On Fri, 13 Aug 2004 17:37:20 -0400, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Craig McClanahan wrote:
> 
> >>>I can then
> >>>call a private setUp() method in my Action that is used to set up my
> >>>form with any other request attributes that should always be there.
> >>
> >>I'm curious why using the input parameter doesn't work for you?
> >>
> >
> >
> > Indeed ... the feature is working as it was designed, based on
> > application user expectations that, if errors occur, whatever they
> > typed in is redisplayed (even if it is wrong) so that it can be
> > corrected.  That's the way that any rich GUI client works, and nobody
> > wants to use apps that force you to fill an entire form in again
> > simply because you made one mistake.
> 
> I'm sorry I should have qualified.... I didn't mean setUp "my form" but
> set up things "on the resulting JSP that I forward to" - for example
> drop down lists etc. I never repopulate the form inputs and ActionForm
> fields.. those stay populated fine... but Leandro's original question
> was about objects that he was sticking in request scope with
> request.setAttribute( ..) (not ActionForm properties). My point was that
> those Request objects that a JSP might always need to have populated on
> the page will be lost if you do form validation the conventional struts
> way. Using Session or Application scope is not always the best place to
> place Objects that a JSP might need, so when validation fails you need a
> way to sometimes replace these objects - hence I call validate()
> manually and use a setUp() method used to populate the Request with
> objects my resulting JSP should have.
> 

That makes more sense now.

I tend to put all my lookup data (for dropdown lists and such) into
application scope (if its global) or session scope (if it's user
specific), primarily as a performance enhancement ... I only have to
look it up once, instead of once per request.  As a side effect, you
don't have to worry about the values going away, like you do if they
are in request scope.


> --
> Rick

Craig


> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to