You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by chickabee <ja...@gmail.com> on 2007/09/16 19:33:50 UTC

Capturing Form Data into Nice URL !

I have simple form:
=================
    private class SearchForm extends Form {
        private final ValueMap properties = new ValueMap();
        private TextField querystring;

        public SearchForm(String id){
            super(id);
            add(querystring = new TextField("querystring", new
PropertyModel(properties, "q")));
        }

        public final void onSubmit(){
            setResponsePage(SearchPage.class);
        }
    }
===================
When I enter the text 'keyword' into the text field and press Submit it
happily forwards to:
https://lilo:8443/whisky/app/search

How do i embed the form data into the forwarded url like this:
https://lilo:8443/whisky/app/search/q/keyword

Any pointer in right direction is appreciated, thanks..






-- 
View this message in context: http://www.nabble.com/Capturing-Form-Data-into-Nice-URL-%21-tf4461968.html#a12723634
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


Re: Capturing Form Data into Nice URL !

Posted by Igor Vaynberg <ig...@gmail.com>.
setresponsepage(searchpage.class, new pageparamters(proeprties));

-igor


On 9/16/07, chickabee <ja...@gmail.com> wrote:
>
>
> I have simple form:
> =================
>     private class SearchForm extends Form {
>         private final ValueMap properties = new ValueMap();
>         private TextField querystring;
>
>         public SearchForm(String id){
>             super(id);
>             add(querystring = new TextField("querystring", new
> PropertyModel(properties, "q")));
>         }
>
>         public final void onSubmit(){
>             setResponsePage(SearchPage.class);
>         }
>     }
> ===================
> When I enter the text 'keyword' into the text field and press Submit it
> happily forwards to:
> https://lilo:8443/whisky/app/search
>
> How do i embed the form data into the forwarded url like this:
> https://lilo:8443/whisky/app/search/q/keyword
>
> Any pointer in right direction is appreciated, thanks..
>
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Capturing-Form-Data-into-Nice-URL-%21-tf4461968.html#a12723634
> 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
>
>

Re: Capturing Form Data into Nice URL !

Posted by chickabee <ja...@gmail.com>.
I found one way to do it, by using:

setResponsePage(SearchPage.class, PageParameters);

This worked  well, Thanks.. 



chickabee wrote:
> 
> I have simple form:
> =================
>     private class SearchForm extends Form {
>         private final ValueMap properties = new ValueMap();
>         private TextField querystring;
> 
>         public SearchForm(String id){
>             super(id);
>             add(querystring = new TextField("querystring", new
> PropertyModel(properties, "q")));
>         }
> 
>         public final void onSubmit(){
>             setResponsePage(SearchPage.class);
>         }
>     }
> ===================
> When I enter the text 'keyword' into the text field and press Submit it
> happily forwards to:
> https://lilo:8443/whisky/app/search
> 
> How do i embed the form data into the forwarded url like this:
> https://lilo:8443/whisky/app/search/q/keyword
> 
> Any pointer in right direction is appreciated, thanks..
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Capturing-Form-Data-into-Nice-URL-%21-tf4461968.html#a12723756
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