See the source of
http://www.wicket-library.com/wicket-examples/mailtemplate example

On Mon, Nov 14, 2011 at 3:31 PM, Dirk Forchel <dirk.forc...@exedio.com> wrote:
> With Wicket 1.4 we used the CapturingBookmarkablePageRequestTarget (and the
> belonging CapturingBookmarkablePageRequestTargetUrlCodingStrategy) from the
> static examples to capture the response of a page request and display
> another page as result instead. I still don't know how to achieve the same
> with Wicket 1.5.
>
> public abstract class CapturingBookmarkablePageRequestTarget extends
> BookmarkablePageRequestTarget
> {
>        ...
>
>        @Override
>        public void respond(final RequestCycle requestCycle)
>        {
>                final StringResponse stringResponse = new StringResponse();
>                final WebResponse originalResponse =
> (WebResponse)RequestCycle.get().getResponse();
>                RequestCycle.get().setResponse(stringResponse);
>                super.respond(requestCycle);
>                // handle the string response
>                onCapture(stringResponse);
>                RequestCycle.get().setResponse(originalResponse);
>                RequestCycle.get().setRequestTarget(new
> BookmarkablePageRequestTarget(displayedPageClass, getPageParameters()));
>        }
>
>        protected abstract void onCapture(StringResponse stringResponse);
> }
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Capture-the-response-of-a-page-request-and-displays-another-page-as-result-tp4039468p4039468.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



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

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

Reply via email to