You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jg...@bravepoint.com on 2001/11/21 20:49:51 UTC
re: prepopulating, initializing and securing a form
Are you sure that your validate() method is not causing you to bounce back
to your input page? IOW, are you trying to validate data that wouldn't/couldn't
be there yet? Consider putting some printlns in validate() and/or make sure
you have an <html:errors/> on your input page.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: prepopulating, initializing and securing a form
Posted by Derek Clayton <de...@iceinc.com>.
You got it. /bonk me
The validate() method was producing errors since no form data had yet been
set (as the form hadn't even been presented to the user).
I added an "action=" parameter to the calling query so when the page is
called with "action=display" it ignores error checking. Subsequent
callbacks (when the user submits the form) have no action set so my
ActionForm will validate. It also allows me to perform any kind of
initialization on the form from within action servlet when the
action=display.
I didn't notice the errors occurring at first since the <html:errors/> tag
wasn't functioning properly and wasn't displaying any errors. I swear it
was working before the designers applied their template to the jsp page. 8)
----- Original Message -----
From: <jg...@bravepoint.com>
Sent: Wednesday, November 21, 2001 2:49 PM
Subject: re: prepopulating, initializing and securing a form
> Are you sure that your validate() method is not causing you to bounce back
> to your input page? IOW, are you trying to validate data that
wouldn't/couldn't
> be there yet? Consider putting some printlns in validate() and/or make
sure
> you have an <html:errors/> on your input page.
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>