You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Anatoly Kupriyanov <ka...@gmail.com> on 2008/11/18 13:15:47 UTC

nice URL for forms

I have a simple search form. with query text field "q" and "go"
button. I do the form method=get and stateless (as search form shd be
I guess).
The url becomes:
http://127.0.0.1:8080/site/search/wicket:interface/:20:design:search::IFormSubmitListener::/?search7c_hf_0=&..%2F..%2F..%2F..%2Fclient%2Fsearch%2Fwicket%3Ainterface%2F%3A30%3Adesign%3Asearch%3A%3AIFormSubmitListener%3A%3A%2F=&q=word

What can I do to make it more RESTful?

PS: wicket v1.4-rc1

-- 
WBR, kan.

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


Re: nice URL for forms

Posted by kan <ka...@gmail.com>.
Just a thought. Does it have any sense to make something like
"BookmarkablePageForm" component?
So, the component would be designed to use with <form> and takes
Page.class (and maybe PageParameters which could be serialized as set
of <input type=hidden>). It generates "action" attribute which points
to the page (probably mounted) and behaves like BookmarkablePageLink,
but data could be taken from form input.
Example:
[SomePage.html]
<form wicket:id="search"><input name="q"><input type="submit"></form>
[SomePage.java]
add(new BookmarkablePageForm("search", SearchPage.class));
[SearchPage.java]
pubilc SearchPage(PageParameters params)
{
// use params.getAsString("q") as search criteria.
}

Could it be useful for anybody?

2008/11/18 Jeremy Thomerson <je...@wickettraining.com>:
> See this answer from Johan maybe two days ago on the same question:
> http://www.nabble.com/Simple-GET-based-stateless-form-to20535056.html#a20536810
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Tue, Nov 18, 2008 at 6:15 AM, Anatoly Kupriyanov <ka...@gmail.com>wrote:
>
>> I have a simple search form. with query text field "q" and "go"
>> button. I do the form method=get and stateless (as search form shd be
>> I guess).
>> The url becomes:
>>
>> http://127.0.0.1:8080/site/search/wicket:interface/:20:design:search::IFormSubmitListener::/?search7c_hf_0=&..%2F..%2F..%2F..%2Fclient%2Fsearch%2Fwicket%3Ainterface%2F%3A30%3Adesign%3Asearch%3A%3AIFormSubmitListener%3A%3A%2F=&q=word
>>
>> What can I do to make it more RESTful?
>>
>> PS: wicket v1.4-rc1
>>
>> --
>> WBR, kan.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>



-- 
WBR, kan.

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


Re: nice URL for forms

Posted by Jeremy Thomerson <je...@wickettraining.com>.
See this answer from Johan maybe two days ago on the same question:
http://www.nabble.com/Simple-GET-based-stateless-form-to20535056.html#a20536810

-- 
Jeremy Thomerson
http://www.wickettraining.com

On Tue, Nov 18, 2008 at 6:15 AM, Anatoly Kupriyanov <ka...@gmail.com>wrote:

> I have a simple search form. with query text field "q" and "go"
> button. I do the form method=get and stateless (as search form shd be
> I guess).
> The url becomes:
>
> http://127.0.0.1:8080/site/search/wicket:interface/:20:design:search::IFormSubmitListener::/?search7c_hf_0=&..%2F..%2F..%2F..%2Fclient%2Fsearch%2Fwicket%3Ainterface%2F%3A30%3Adesign%3Asearch%3A%3AIFormSubmitListener%3A%3A%2F=&q=word
>
> What can I do to make it more RESTful?
>
> PS: wicket v1.4-rc1
>
> --
> WBR, kan.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>