Hi,
With Wicket 1.5 you can use executeUrl() to do that.
p = startPage
c = p.get("....")
b = c.getBehaviorByXyz()
u = b.getCallbackUrl()
fullUrl = u + "&foo=bar&wicket-ajax=true"
executeUrl(fullUrl)
On Mon, Nov 28, 2011 at 6:59 AM, Sebastiaan van Erk <[email protected]> wrote:
> Hi all,
>
> I've got a page which calls wicket from javascript as described by the page:
>
> https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html
>
> That is, in my JavaScript I call a function:
>
> function callWicket() {
> var wcall = wicketAjaxGet('$url$' + '$args$', function() { }, function() {
> });
> }
>
> The args are of the form "&foo=bar" as described. I also retrieve this
> argument when I receive the call in Wicket using (also as described):
>
> String paramFoo = RequestCycle.get().getRequest().getParameter("foo");
>
> However, I'm wondering, how can I test this using WicketTester?
>
> I first use startPage to render the page, but how can I now simulate the
> wicketAjaxGet, and how can I make sure the parameter is set on the request
> so paramFoo does not end up being null?
>
> Best regards,
> Sebastiaan
>
>
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]