Response below...

"Knoernschild, Kirk W" <[EMAIL PROTECTED]> wrote:
>  I'm using a databean to populate my JSP page. I put the bean on
> the request. The page populates fine. When submitting however,
> Struts builds my formbean and calls the validate method. If the
> validate method fails, I try to return to the submitting page.
> However, that page uses the databean, which is no longer in
> scope, and I error out. Others must have this same challenge.
> What have y'all done to accommodate this? thanx.

I actually ran into a similar problem for some dropdown lists.  It turns out
that for my application, the information needed in the drop down list could be
safely (and probably appropriately) moved into the application scope.  So, you
could consider simply moving the information into a longer persistance scope
(such as session).

However, I would question what you are using the databean for.  The vast
majority of the data needed in a form page should come straight off of the
formBean.  Struts handles the preservation of those for you.  What other sort
of information are you hoping to preserve?  Is it specific to this incarnation
of this page, or would every page that looks like this use it?  (In my case,
that was the answer.  This information was used by every page that had this
input field, so I decided to put it in application scope to save trips to the
database as well as keep me from having to jump hoops.)

-josh


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to