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>
 
beanName 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>beanName</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)
          Create application object
 
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)
Description copied from interface: IWebApplicationFactory
Create application object

Specified by:
createApplication in interface IWebApplicationFactory
Parameters:
filter - the wicket filter
Returns:
application object instance
See Also:
IWebApplicationFactory.createApplication(WicketFilter)


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