struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt E <>
Subject Form Bean Help?
Date Tue, 29 Jul 2003 16:37:25 GMT
Hello All,

I'm running into a little problem, maybe someone can
help me fix it.

My application is driven by filling out web forms.  At
one point, A user can click the "Save Form" button,
which writes the form information to a Database.  When
the user visits the page again, the action builds a
DTO that contains all the information they had filled
out and puts it in the session scope, then forwards to
the JSP page that has the form on it.

I had been using the value property of the struts-html
tags to fill in the data, but I've noticed that when
the user hits submit, if there is a validation error,
they are pushed back to the page, and the data they
had enetered is replaced with what was in the DTO
(which is now old data).  I've also run into the
problem of filling in things like radio buttons, based
on what was in the DTO.

It seems to me that what I want to do is not pass
along the DTO with the action, but fill out parts of
the Form Bean before forwarding to the page that
displays it, at which point I could remove the value
properties of the html tags, and have everything work.

My question is, how can I do this from the action?  Or
do I want to attack this problem in another way?


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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

View raw message