Re: Form submit and nice urls

2011-07-02 Thread Dan
omponentTagBody = false; } }; f.add(new AttributeModifier("action", true, new Model(url.toString(; add(f); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-submit-and-nice-urls-tp3521053

Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
Hopefully I do not waste your time with my stupidity: https://issues.apache.org/jira/browse/WICKET-3720 https://issues.apache.org/jira/secure/attachment/12479325/double-form-submit.zip > Please create a quickstart app (.zip, .tgz) and attach it to a ticket in our > Jira. > > On Mon, May 16, 20

Re: Form submit and nice urls

2011-05-16 Thread Martin Grigorov
Please create a quickstart app (.zip, .tgz) and attach it to a ticket in our Jira. On Mon, May 16, 2011 at 2:33 PM, Peter Karich wrote: > Hi Martin, > > > I don't understand your question. > > sorry :( > I try to explain it again :) > > When I access my app with the url > http://localhost:8080/

Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
Hi Martin, > I don't understand your question. sorry :( I try to explain it again :) When I access my app with the url http://localhost:8080/app/?q=test all is fine. But when I submit a new query 'todo' then wicket somehow 1. calls the submit (ok) 2. redirects to HomePage (ok) 3. *but then agai

Re: Form submit and nice urls

2011-05-16 Thread Martin Grigorov
I don't understand your question. with the current code doing the POST is quite cheap. it just brings the value for the search to form#onSubmit and makes a redirect to HomePage(PageParameters) where you check for the existence of the 'q' parameter and either do the heavy calculation or not. You ma

Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
Hi Martin, thanks for the explanation! Why is the first call done to submit my form? Because my app is doing an 'expensive' search query for every instantiation, thus I would like to trigger the search only with the necessary submitted query. Can I somehow distinguish a request with an empty q

Re: Form submit and nice urls

2011-05-16 Thread Martin Grigorov
Hi Peter, Here is how it should work: - Home page constructor is called initially without 'q' thus null - the submit makes a POST call to Form.onSubmit() (the print is not called because the page is not re-instanciated, unless it is stateless) - onSubmit() calls setResponsePage(Class, PageParamete

Re: Form submit and nice urls

2011-05-16 Thread Peter Karich
Anybody? > Hi, > > when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls > ala ?q=something e.g. for typing something in the textfield. The problem > is that it prints two GET requests (why not POST + GET?): > > NOW: q = "[todo]" query=todo GET > NOW: query=null GET

Form submit and nice urls

2011-05-13 Thread Peter Karich
Hi, when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls ala ?q=something e.g. for typing something in the textfield. The problem is that it prints two GET requests (why not POST + GET?): NOW: q = "[todo]" query=todo GET NOW: query=null GET In firebug I can see PO

Form submit and nice urls

2011-05-13 Thread Peter Karich
Hi, when I'm doing [1] in 1.4.17 in a quickstart then I'm getting nice urls ala ?q=something e.g. for typing something in the textfield. The problem is that it prints two GET requests (why not POST + GET?): NOW: q = "[todo]" query=todo GET NOW: query=null GET In firebug I can see PO