Class WebPageRenderer
- java.lang.Object
-
- org.apache.wicket.request.handler.render.PageRenderer
-
- org.apache.wicket.request.handler.render.WebPageRenderer
-
public class WebPageRenderer extends PageRenderer
PageRendererfor web applications.- Author:
- Matej Knopp
-
-
Constructor Summary
Constructors Constructor Description WebPageRenderer(RenderPageRequestHandler renderPageRequestHandler)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancompatibleProtocols(java.lang.String p1, java.lang.String p2)Compares the protocols of twoUrlsprotected booleanisAjax(RequestCycle requestCycle)protected booleanisNewPageInstance()protected booleanisPageStateless()protected voidredirectTo(org.apache.wicket.request.Url url, RequestCycle requestCycle)protected BufferedWebResponserenderPage(org.apache.wicket.request.Url targetUrl, RequestCycle requestCycle)Renders page to aBufferedWebResponse.voidrespond(RequestCycle requestCycle)Render the response using giveRequestCycle.protected booleanshouldPreserveClientUrl(RequestCycle requestCycle)protected booleanshouldRedirectToTargetUrl(RequestCycle cycle, org.apache.wicket.request.Url currentUrl, org.apache.wicket.request.Url targetUrl)Should the client be redirected to target url.protected booleanshouldRenderPageAndWriteResponse(RequestCycle cycle, org.apache.wicket.request.Url currentUrl, org.apache.wicket.request.Url targetUrl)Should the page be rendered immediately.protected voidstoreBufferedResponse(org.apache.wicket.request.Url url, BufferedWebResponse response)Store the buffered response at application level.-
Methods inherited from class org.apache.wicket.request.handler.render.PageRenderer
enableRedirectForStatelessPage, getPage, getPageProvider, getRedirectPolicy, getRenderPageRequestHandler, getSessionId, isOnePassRender, isRedirectToBuffer, isRedirectToRender, isSessionTemporary
-
-
-
-
Constructor Detail
-
WebPageRenderer
public WebPageRenderer(RenderPageRequestHandler renderPageRequestHandler)
Construct.- Parameters:
renderPageRequestHandler-
-
-
Method Detail
-
isAjax
protected boolean isAjax(RequestCycle requestCycle)
-
storeBufferedResponse
protected void storeBufferedResponse(org.apache.wicket.request.Url url, BufferedWebResponse response)Store the buffered response at application level. If current session is temporary, a permanent one is created.- Parameters:
url-response-
-
renderPage
protected BufferedWebResponse renderPage(org.apache.wicket.request.Url targetUrl, RequestCycle requestCycle)
Renders page to aBufferedWebResponse. All URLs in page will be rendered relative totargetUrl- Parameters:
targetUrl-requestCycle-- Returns:
- BufferedWebResponse containing page body
-
redirectTo
protected void redirectTo(org.apache.wicket.request.Url url, RequestCycle requestCycle)- Parameters:
url-requestCycle-
-
respond
public void respond(RequestCycle requestCycle)
Description copied from class:PageRendererRender the response using giveRequestCycle.- Specified by:
respondin classPageRenderer
-
isPageStateless
protected boolean isPageStateless()
-
isNewPageInstance
protected boolean isNewPageInstance()
-
shouldPreserveClientUrl
protected boolean shouldPreserveClientUrl(RequestCycle requestCycle)
-
shouldRedirectToTargetUrl
protected boolean shouldRedirectToTargetUrl(RequestCycle cycle, org.apache.wicket.request.Url currentUrl, org.apache.wicket.request.Url targetUrl)
Should the client be redirected to target url.
-
shouldRenderPageAndWriteResponse
protected boolean shouldRenderPageAndWriteResponse(RequestCycle cycle, org.apache.wicket.request.Url currentUrl, org.apache.wicket.request.Url targetUrl)
Should the page be rendered immediately.
-
compatibleProtocols
protected boolean compatibleProtocols(java.lang.String p1, java.lang.String p2)Compares the protocols of twoUrls- Parameters:
p1- the first protocolp2- the second protocol- Returns:
falseif the protocols are both non-null and not equal,true- otherwise
-
-