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

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

Introduction

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

Prototype

public final ICompoundRequestMapper getRootRequestMapperAsCompound() 

Source Link

Document

Converts the root mapper to a ICompoundRequestMapper if necessary and returns the converted instance.

Usage

From source file:fiftyfive.wicket.resource.SimpleCDN.java

License:Apache License

/**
 * Install this {@code SimpleCDN} into the given application. The {@code SimpleCDN} instance
 * will not have any effect unless it is installed.
 *//* w w  w . ja  v a 2  s .  c  o  m*/
public void install(WebApplication app) {
    this.delegate = app.getRootRequestMapperAsCompound();
    app.mount(this);
}

From source file:jp.xet.uncommons.wicket.utils.SimpleCDN.java

License:Apache License

/**
 * Install this {@code SimpleCDN} into the given application. The {@code SimpleCDN} instance
 * will not have any effect unless it is installed.
 * //from w  w  w  .  j  a  v a  2 s  . c o m
 * @param app {@link WebApplication}
 */
public void install(WebApplication app) {
    delegate = app.getRootRequestMapperAsCompound();
    app.mount(this);
}

From source file:org.brixcms.Brix.java

License:Apache License

/**
 * Performs any {@link WebApplication} specific initialization
 *
 * @param application//from   ww  w.ja  v  a2s. com
 */
public void attachTo(WebApplication application) {
    if (application == null) {
        throw new IllegalArgumentException("Application cannot be null");
    }

    // store brix instance in applicaton's metadata so it can be retrieved
    // easily later
    application.setMetaData(APP_KEY, this);

    /*
       * XXX we are coupling to nodepage plugin here instead of using the
       * usual register mechanism - we either need to make plugins application
       * aware so they can install their own listeners or have some brix-level
       * registery
       */
    application.getComponentPreOnBeforeRenderListeners().add(new PageParametersAwareEnabler());

    // allow brix to handle any url that wicket cant
    application.getRootRequestMapperAsCompound().add(new BrixRequestMapper(this));
    // application.mount(new BrixNodePageUrlMapper());

    // register a string resource loader that allows any object that acts as
    // an extension supply its own resource bundle for the UI
    BrixExtensionStringResourceLoader loader = new BrixExtensionStringResourceLoader();
    application.getResourceSettings().getStringResourceLoaders().add(loader);
    config.getRegistry().register(loader, true);
}