org.apache.wicket.request.target.component
Class PageReferenceRequestTarget

java.lang.Object
  extended by org.apache.wicket.request.target.component.PageReferenceRequestTarget
All Implemented Interfaces:
IRequestTarget, IPageRequestTarget
Direct Known Subclasses:
PageIdRequestTarget

public class PageReferenceRequestTarget
extends Object
implements IPageRequestTarget

Target that navigates to a page pointed to by its id. The great benefit of this target over the PageRequestTarget is that no reference to the actual page is needed, which greatly facilitates navigational usecases where a list or a stack of page references is needed (ie breadcrumbs).

Author:
igor.vaynberg
See Also:
PageReference

Constructor Summary
PageReferenceRequestTarget(Page page)
          Constructor Even though a page is passed in, only a reference to its PageReference is kept
PageReferenceRequestTarget(PageReference pageReference)
          Constructor
 
Method Summary
 void detach(RequestCycle 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.
 Page getPage()
          Gets the page instance.
 PageReference getPageReference()
           
 void respond(RequestCycle requestCycle)
          Generates a response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageReferenceRequestTarget

public PageReferenceRequestTarget(Page page)
Constructor Even though a page is passed in, only a reference to its PageReference is kept

Parameters:
page -

PageReferenceRequestTarget

public PageReferenceRequestTarget(PageReference pageReference)
Constructor

Parameters:
pageReference -
Method Detail

getPageReference

public final PageReference getPageReference()
Returns:
id page id

respond

public void respond(RequestCycle requestCycle)
Generates a response.

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

detach

public void detach(RequestCycle 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 IRequestTarget
Parameters:
requestCycle - the current request cycle

getPage

public Page getPage()
Gets the page instance.

Specified by:
getPage in interface IPageRequestTarget
Returns:
the page instance


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