Example usage for org.apache.wicket.protocol.http WebApplication setWicketFilter

List of usage examples for org.apache.wicket.protocol.http WebApplication setWicketFilter

Introduction

In this page you can find the example usage for org.apache.wicket.protocol.http WebApplication setWicketFilter.

Prototype

public final void setWicketFilter(final WicketFilter wicketFilter) 

Source Link

Document

THIS METHOD IS NOT PART OF THE WICKET PUBLIC API.

Usage

From source file:com.mastfrog.acteur.wicket.WicketApplicationInitializer.java

License:Open Source License

protected void init(Application application) throws NoSuchFieldException, IllegalArgumentException,
        IllegalAccessException, NoSuchMethodException, InvocationTargetException {
    WebApplication wa = (WebApplication) application;
    wa.setWicketFilter(filter);
    wa.setServletContext(ctx);/*from   w w  w.ja  v a 2s.  co  m*/
    wa.setSessionStoreProvider(this);
    ThreadContext.setApplication(application);
    application.setName(application.getClass().getName());
    application.initApplication();
    wa.setSessionStoreProvider(this);
    Field field = Application.class.getDeclaredField("pageFactory");
    field.setAccessible(true);
    field.set(application, factory);
    Method logStarted = WebApplication.class.getDeclaredMethod("logStarted");
    logStarted.setAccessible(true);
    logStarted.invoke(application);
}