struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregor Rayman" <>
Subject Re: Population of form in case of errors
Date Wed, 22 Aug 2001 14:11:05 GMT
"Ralph vd Houdt" <> wrote:

> Hi All,
> I have a form wich get default values from a bean. with the name and
> property tags of the html:text tag. When the form has errors using the
> validate(ActionMapping mapping,HttpServletRequest request) method the field
> don't get repopulated with the text I it changed to. But it gets the calues
> from the bean again.
> Is there a workaround?

If it is a request scoped form, then the form bean you use to display
values in JSP differs from the one which is populated from the request.

Each request gets its own fresh and empty form bean and this bean is
then populated from the request. No action is activated to pre-populate
the form.

One possible sulution for this problem would be to insert a <html:hidden>
for each <bean:write>. This assures, the form properties to be filled.



View raw message