struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Burns" <frankbu...@the-hub.demon.co.uk>
Subject Struts starter
Date Sun, 07 Mar 2004 21:14:57 GMT
Hi,
I'm in the middle of working with my first application using Struts and desperately need some
help.
I've read nearly all of Ted Husted's "Struts In Action" book and browsed the mailing list
archives but have not found a solution for what I want to do.
I mention this to let you know that I have already tried hard, unsuccessfully, to find an
answer to what seems to me to be a basic requirement.
However, I may be struggling with my own misunderstanding!

HERE'S THE BACKGROUND

I have a session bean (validUser) and I want to use its properties to initially populate a
"PersonalDetails" form.
Then I want to use the validate() method of the related ActionForm (PersonalDetailsForm) to
check the newly submitted details and, if failing validation, redisplay them in the PersonalDetails
form, so that the user can correct them.

HERE'S THE QUESTION:

Where and how do I "initialize" (prepopulate) the form fields with the properties from the
validUser bean, but then enable them to be populated with the information entered by the user
when the form fails validation?

HERE'S WHAT I'VE TRIED

I've tried using <html:text ...> tags in the form, but they only seem to accept values
from either the default form bean or from a specified bean -- so that seems only to a give
a single source for populating the fields.

Thanks,

Frank.





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message