org.apache.wicket
Interface IPageFactory

All Known Implementing Classes:
DefaultPageFactory

public interface IPageFactory

A factory class that creates Pages. A Page can be created by Class, with or without a PageParameters argument to pass to the Page's constructor.

IMPORTANT NOTE: Implementations must let subclasses of AbstractRestartResponseException thrown from the constructing page's constructor bubble up.

Author:
Juergen Donnerstag, Jonathan Locke
See Also:
ISessionSettings.setPageFactory(IPageFactory), Session.getPageFactory(), Session.getPageFactory(Page)

Method Summary
 Page newPage(java.lang.Class pageClass)
          Creates a new page using a page class.
 Page newPage(java.lang.Class pageClass, PageParameters parameters)
          Creates a new Page, passing PageParameters to the Page constructor if such a constructor exists.
 

Method Detail

newPage

Page newPage(java.lang.Class pageClass)
Creates a new page using a page class.

Parameters:
pageClass - The page class to instantiate
Returns:
The page
Throws:
WicketRuntimeException - Thrown if the page cannot be constructed

newPage

Page newPage(java.lang.Class pageClass,
             PageParameters parameters)
Creates a new Page, passing PageParameters to the Page constructor if such a constructor exists. If no such constructor exists and the parameters argument is null or empty, then any available default constructor will be used.

Parameters:
pageClass - The class of Page to create
parameters - Any parameters to pass to the Page's constructor
Returns:
The new page
Throws:
WicketRuntimeException - Thrown if the page cannot be constructed


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