org.apache.wicket.request.handler
Class RenderPageRequestHandler

java.lang.Object
  extended by org.apache.wicket.request.handler.RenderPageRequestHandler
All Implemented Interfaces:
IPageClassRequestHandler, IPageRequestHandler, IRequestHandler

public class RenderPageRequestHandler
extends Object
implements IPageRequestHandler, IPageClassRequestHandler

IRequestHandler that renders page instance. Depending on the redirectPolicy flag and current request strategy the handler either just renders the page to the response, or redirects to render the page. REDIRECT_TO_BUFFER strategy is also supported.

Author:
Matej Knopp

Nested Class Summary
static class RenderPageRequestHandler.RedirectPolicy
          Determines whether Wicket does a redirect when rendering a page
 
Constructor Summary
RenderPageRequestHandler(IPageProvider pageProvider)
          Construct.
RenderPageRequestHandler(IPageProvider pageProvider, RenderPageRequestHandler.RedirectPolicy redirectPolicy)
          Construct.
 
Method Summary
 void detach(IRequestCycle requestCycle)
          This method is called at the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.
 IRequestablePage getPage()
          Returns the page
 Class<? extends IRequestablePage> getPageClass()
          Returns the page class
 PageParameters getPageParameters()
          
 IPageProvider getPageProvider()
           
 RenderPageRequestHandler.RedirectPolicy getRedirectPolicy()
           
 void respond(IRequestCycle requestCycle)
          Generates a response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderPageRequestHandler

public RenderPageRequestHandler(IPageProvider pageProvider)
Construct. Renders the page with a redirect if necessary.

Parameters:
pageProvider -

RenderPageRequestHandler

public RenderPageRequestHandler(IPageProvider pageProvider,
                                RenderPageRequestHandler.RedirectPolicy redirectPolicy)
Construct.

Parameters:
pageProvider -
redirectPolicy -
Method Detail

getPageProvider

public IPageProvider getPageProvider()
Returns:
page provider

getRedirectPolicy

public RenderPageRequestHandler.RedirectPolicy getRedirectPolicy()
Returns:
redirect policy

getPageClass

public Class<? extends IRequestablePage> getPageClass()
Returns the page class

Specified by:
getPageClass in interface IPageClassRequestHandler
Returns:
page class

getPageParameters

public PageParameters getPageParameters()

Specified by:
getPageParameters in interface IPageClassRequestHandler
Returns:
page parameters

detach

public void detach(IRequestCycle requestCycle)
This method is called at the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.

Specified by:
detach in interface IRequestHandler
Parameters:
requestCycle - the current request cycle

getPage

public IRequestablePage getPage()
Returns the page

Specified by:
getPage in interface IPageRequestHandler
Returns:
page instance

respond

public void respond(IRequestCycle requestCycle)
Generates a response.

Specified by:
respond in interface IRequestHandler
Parameters:
requestCycle - the current request cycle


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.