You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kan <ka...@gmail.com> on 2008/09/16 23:30:31 UTC

StatelessForm data becomes PageParameters and as result is doubling

If I have stateless form on a page, and form is submitted, page is
constructed again with all form data as parameters. Ok, it's not great
but it's impossible to avoid.
But, if the form has validation errors and the same page is rendered
again, it has all that parameters in <form action="..."> and next
request has the parameters doubled - from currently data from "post"
and previous data from query string.
How to avoid it?

-- 
WBR, kan.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: StatelessForm data becomes PageParameters and as result is doubling

Posted by kan <ka...@gmail.com>.
2008/9/17 Michael Sparer <mi...@gmx.at>:

> without looking at code - can't you circumvent the problem by using POST
> instead of GET?
I use post already.
I got it. I have
class MyPage extends WebPage
{
 public MyPage(PageParameters parameters)
 {
   super(parameters);// --- this line is the problem.
 }
}

So... "parameters" variable has all submission data... Not sure how to
solve it correctly. I have to determine somehow which parameters are
page parameters, but which are just some form inside.

-- 
WBR, kan.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: StatelessForm data becomes PageParameters and as result is doubling

Posted by Michael Sparer <mi...@gmx.at>.
without looking at code - can't you circumvent the problem by using POST
instead of GET?


kan-4 wrote:
> 
> If I have stateless form on a page, and form is submitted, page is
> constructed again with all form data as parameters. Ok, it's not great
> but it's impossible to avoid.
> But, if the form has validation errors and the same page is rendered
> again, it has all that parameters in <form action="..."> and next
> request has the parameters doubled - from currently data from "post"
> and previous data from query string.
> How to avoid it?
> 
> -- 
> WBR, kan.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: http://www.nabble.com/StatelessForm-data-becomes-PageParameters-and-as-result-is-doubling-tp19521093p19526355.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org