Thanks, Igor, that makes sense.

But still one more question before I really understand onSubmit():

I could have this in my onSubmit:

if( isValidated )
  setResponsePage( PageOne.class );
else
  setResponsePage( PageTwo.class );


So, what gets sent back in the HttpServletResponse is different
according to the validation of the form (data being sent via POST and
handled in the background by Wicket).

Are you saying that in either case, the URL would be the same (i.e. the
one generated by Wicket magic and seen in the html of the form), but the
content of reply would be different depending on whether it's PageOne or
PageTwo?


If so... it all makes sense to me now... :-)

Very smart, too!



On Wed, 2007-07-04 at 07:34 -0700, Igor Vaynberg wrote:
> On 7/4/07, David Leangen <[EMAIL PROTECTED]> wrote:
> 
>  
>         
>         What I can't figure out here is this: when the form's submit
>         button gets
>         pressed on the current page, obvious a new HttpServletRequest
>         gets sent to
>         the server, and the onSubmit() method gets invoked.
>         
>         1. What URL is sent to the server?
> 
> the url that is defined in form.action attribute in html. it tells
> wicket that the form has been submitted, pointing out which one. 
> 
>         2. Since the response can differ according to the input
>              of the form, this means that the URL could change
>              according to the input... but the URL is already
>              decided on in step 1
> 
> the url is the same but the post values are different. 
> 
> 
> -igor
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________ Wicket-user mailing list 
> Wicket-user@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to