Based on the staticpages examples in Wicket 1.4 we used a
CapturingBookmarkablePageRequestTargetUrlCodingStrategy to capture requests
to a bookmarkable page with page parameters and respond with a 'static' page
afterwards. During the capture phase
(CapturingBookmarkablePageRequestTarget#onCapture()) we did some logic in
here (sending an email, generating some stuff etc.). 

public abstract class CapturingBookmarkablePageRequestTarget extends
BookmarkablePageRequestTarget
{
        @Override
        public void respond(RequestCycle requestCycle)
        {
                final StringResponse stringResponse = new StringResponse();
                final WebResponse originalResponse =
(WebResponse)RequestCycle.get().getResponse();
                RequestCycle.get().setResponse(emailResponse);
                super.respond(requestCycle);
                // handle the string response e.g. send email
                onCapture(emailResponse);
                RequestCycle.get().setResponse(originalResponse);
                RequestCycle.get().setRequestTarget(new
BookmarkablePageRequestTarget(displayedPageClass));
        }

        protected abstract void onCapture(StringResponse emailResponse);
}

In Wicket 1.5 the staticpages examples are removed completely, why? 
I'm not really sure how to migrate our code from Wicket 1.4 to Wicket 1.5,
but would assume I must provide my own RequestHandler and/or RequestMapper
or is there another solution I'm not aware? What would be the preferred way
to provide the same functionallity as with Wicket 1.4?
Thank you.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Capturing-requests-to-bookmarkable-page-and-respond-with-static-page-tp3984679p3984679.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

Reply via email to