On Thursday 25 October 2007 3.27.07 pm Per Newgro wrote:
> how can i reload the page managed by my wicketTester instance.
We're doing it with something like this in a subclass of WicketTester:
public Page refresh() {
final WebRequestCycle cycle = createRequestCycle();
try {
cycle.request(new PageRequestTarget(getLastRenderedPage()));
} finally {
cycle.getResponse().close();
}
//postProcessRequestCycle(cycle);
return getLastRenderedPage();
}
The only difficulty is the commented-out line: the
postProcessRequestCycle(...) method in MockWebApplication is private,
so we had to copy the code into our tester class.
David
.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]