Class WebPageRenderer
- java.lang.Object
-
- org.apache.wicket.request.handler.render.PageRenderer
-
- org.apache.wicket.request.handler.render.WebPageRenderer
-
public class WebPageRenderer extends PageRenderer
PageRenderer
for 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 boolean
compatibleProtocols(String p1, String p2)
Compares the protocols of twoUrl
sprotected boolean
isAjax(RequestCycle requestCycle)
protected boolean
isNewPageInstance()
protected boolean
isPageStateless()
protected void
redirectTo(Url url, RequestCycle requestCycle)
protected BufferedWebResponse
renderPage(Url targetUrl, RequestCycle requestCycle)
Renders page to aBufferedWebResponse
.void
respond(RequestCycle requestCycle)
Render the response using giveRequestCycle
.protected boolean
shouldPreserveClientUrl(RequestCycle requestCycle)
protected boolean
shouldRedirectToTargetUrl(RequestCycle cycle, Url currentUrl, Url targetUrl)
Should the client be redirected to target url.protected boolean
shouldRenderPageAndWriteResponse(RequestCycle cycle, Url currentUrl, Url targetUrl)
Should the page be rendered immediately.protected void
storeBufferedResponse(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(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(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(Url url, RequestCycle requestCycle)
- Parameters:
url
-requestCycle
-
-
respond
public void respond(RequestCycle requestCycle)
Description copied from class:PageRenderer
Render the response using giveRequestCycle
.- Specified by:
respond
in classPageRenderer
-
isPageStateless
protected boolean isPageStateless()
-
isNewPageInstance
protected boolean isNewPageInstance()
-
shouldPreserveClientUrl
protected boolean shouldPreserveClientUrl(RequestCycle requestCycle)
-
shouldRedirectToTargetUrl
protected boolean shouldRedirectToTargetUrl(RequestCycle cycle, Url currentUrl, Url targetUrl)
Should the client be redirected to target url.
-
shouldRenderPageAndWriteResponse
protected boolean shouldRenderPageAndWriteResponse(RequestCycle cycle, Url currentUrl, Url targetUrl)
Should the page be rendered immediately.
-
compatibleProtocols
protected boolean compatibleProtocols(String p1, String p2)
Compares the protocols of twoUrl
s- Parameters:
p1
- the first protocolp2
- the second protocol- Returns:
false
if the protocols are both non-null and not equal,true
- otherwise
-
-