Population of form in case of errors

2001-08-22 Thread Ralph vd Houdt

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?

Greetings Ralph





Re: Population of form in case of errors

2001-08-22 Thread Gregor Rayman

Ralph vd Houdt [EMAIL PROTECTED] 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.


Groetjes

--
gR