org.apache.wicket.spring
Class SpringWebApplicationFactory

java.lang.Object
  extended by org.apache.wicket.spring.SpringWebApplicationFactory
All Implemented Interfaces:
IWebApplicationFactory

public class SpringWebApplicationFactory
extends java.lang.Object
implements IWebApplicationFactory

Implementation of IWebApplicationFactory that pulls the WebApplication object out of spring application context. Configuration example:

 <servlet>
    <servlet-name>phonebook</servlet-name>
    <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
    <init-param>
    <param-name>applicationFactoryClassName</param-name>
    <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
 
applicationBean init parameter can be used if there are multiple WebApplications defined on the spring application context. Example:
 <servlet>
    <servlet-name>phonebook</servlet-name>
    <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
    <init-param>
    <param-name>applicationFactoryClassName</param-name>
    <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
    </init-param>
    <init-param>
    <param-name>applicationBean</param-name>
    <param-value>phonebookApplication</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
 

Author:
Igor Vaynberg (ivaynberg), Janne Hietamäki (jannehietamaki)

Constructor Summary
SpringWebApplicationFactory()
           
 
Method Summary
 WebApplication createApplication(WicketFilter filter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringWebApplicationFactory

public SpringWebApplicationFactory()
Method Detail

createApplication

public WebApplication createApplication(WicketFilter filter)
Specified by:
createApplication in interface IWebApplicationFactory
See Also:
IWebApplicationFactory.createApplication(WicketFilter)


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