You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Niranjan Rao <nh...@gmail.com> on 2011/07/22 20:05:53 UTC

Getting Post DATA

I am very new user of wicket, so please be gentle with me if this is
obvious question or RTFM. I tried searching for docs but no luck.

Using Wicket 1.5.

I have bunch of pages mounted using mountPage(url, page class). This
works fine and pages do get parameters so long as the request is GET.

If you do post on the same url, pages don't see the same parameters. I
tried searching google for the solution and came across one solution at
http://apache-wicket.1842946.n4.nabble.com/Manually-handle-post-data-td1853028.html

However seems like I can not resolve QueryStringUrlCodingStrategy class
in wicket 1.5. Tried looking for replacement calls, but no luck so far.

These are services and there is no UI for this. A script will typically
post the data to the service.

Regards,

Niranjan


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


Re: Getting Post DATA

Posted by Martin Grigorov <mg...@apache.org>.
mountPage() uses MountedMapper behind the scenes. MountedMapper
replaces QueryStringUrlCodingStrategy and several other url coding
strategies from 1.4.
Read http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/ for
more information.

Pages' PageParameters extract only GET parameters, i.e. the ones from
the URL (indexed, named indexed and query string).
POST data can be read with getRequest().getPostParameters(). This
method is used for example in form submit processing code.

I'd use plain Servlet for your needs. If you need Wicket
application/session/request cycle then you can also use Wicket's
resources (org.apache.wicket.request.resource.IResource). I'll talk
about them in my next blog (in few days).

On Fri, Jul 22, 2011 at 9:05 PM, Niranjan Rao <nh...@gmail.com> wrote:
> I am very new user of wicket, so please be gentle with me if this is
> obvious question or RTFM. I tried searching for docs but no luck.
>
> Using Wicket 1.5.
>
> I have bunch of pages mounted using mountPage(url, page class). This
> works fine and pages do get parameters so long as the request is GET.
>
> If you do post on the same url, pages don't see the same parameters. I
> tried searching google for the solution and came across one solution at
> http://apache-wicket.1842946.n4.nabble.com/Manually-handle-post-data-td1853028.html
>
> However seems like I can not resolve QueryStringUrlCodingStrategy class
> in wicket 1.5. Tried looking for replacement calls, but no luck so far.
>
> These are services and there is no UI for this. A script will typically
> post the data to the service.
>
> Regards,
>
> Niranjan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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