OK. But how to 

" and in onsubmit construct the url and redirect to it."

The only methods for redirects I know are the redirectToInterceptPage method or 
the setResponsePage methods. An each method needs a page class as parameter an 
not a self constructed url. I did not find a auitable method in the requestCyle.

How can I set the URL for the response?

Stefan

-----Ursprüngliche Nachricht-----
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. Oktober 2008 22:40
An: users@wicket.apache.org
Betreff: Re: Form submit to bookmarkable page

if anything you can change the form.getmethod() to return GET, but
even then it is the browser that will be doing the encoding and
construcing the final url.

if you really want a clean url like that you will have to use a
regular form and in onsubmit construct the url and redirect to it.

-igor

On Thu, Oct 2, 2008 at 12:27 PM, Stefan Lindner <[EMAIL PROTECTED]> wrote:
> Wow! Seems to be a good starting point. I'm using wicket for 2 years now but 
> still got a lot to learn. Sigh!
> Now I have a form with a simple submit button. In the Form's onComponentTag I 
> have
>
>     tag.put("action", urlFor(TargetPage.class, parameters));
>
> The URL now looks like
>
>     http://mysite.com/myapp/TargetPage
>
> That's a great leap forward. But is there any trick to have the Form's input 
> fields as parameters in the URL? If the Form e.g. has an InputField called 
> "parameter" the URL should look like
>
>     http://mysite.com/myapp/TargetPage/parameter/value
>
> or somethind similar? I have tried several URL encodings but all oft hem led 
> tot he result
>
>     http://mysite.com/myapp/TargetPage
>
> Stefan
>
> -----Ursprüngliche Nachricht-----
> Von: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 2. Oktober 2008 18:06
> An: users@wicket.apache.org
> Betreff: Re: Form submit to bookmarkable page
>
> you can override form's oncomponenttag() and call super then
> tag.put(action, urlfor(yourpage.class));
>
> i believe that should work
>
> -igor
>
> On Thu, Oct 2, 2008 at 8:41 AM, Stefan Lindner <[EMAIL PROTECTED]> wrote:
>> Is it possible to submit a form to a bookmarkable page (with form input
>> as page parameters)?
>> What I want is a form with a submit button/link that leads to a page
>> with e.g. URl
>>
>>     http://mysite.com/myapp/targetPage/param1/value1/param2/value2
>>
>> Of course I mount the submit link#s target page class in
>> Application.init() { mountBookmarkablePage ("targetPage",
>> MyTargetPage.class); }
>>
>> Any hint?
>>
>> Stefan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to