Example usage for org.apache.wicket.util.lang PackageName forClass

List of usage examples for org.apache.wicket.util.lang PackageName forClass

Introduction

In this page you can find the example usage for org.apache.wicket.util.lang PackageName forClass.

Prototype

public static PackageName forClass(final Class<?> c) 

Source Link

Usage

From source file:com.wickettraining.trainingdemo.web.wicket.DemoApplication.java

License:Apache License

@Override
protected void init() {
    super.init();

    addComponentInstantiationListener(createSpringInjector());
    InjectorHolder.getInjector().inject(this);

    mount("pages", PackageName.forClass(HomePage.class));

    getDebugSettings().setComponentUseCheck(false);
    getMarkupSettings().setStripWicketTags(true);
}

From source file:hsa.awp.admingui.WicketApplication.java

License:Open Source License

/**
 * Constructor.
 */
public WicketApplication() {
    mount("login", PackageName.forClass(LoginPage.class));
}

From source file:hsa.awp.usergui.WicketApplication.java

License:Open Source License

/**
 * Constructor.//from  w  w  w.  j a  v a 2  s.com
 */
public WicketApplication() {

    mount("web", PackageName.forClass(HomePage.class));
    mount("login", PackageName.forClass(LoginPage.class));
}

From source file:org.obiba.onyx.webapp.OnyxApplication.java

License:Open Source License

protected void init() {
    log.info("Onyx Web Application [{}] is starting", getServletContext().getContextPath());
    super.init();

    createApplicationContext();/*w w w  . ja  va  2s.c  om*/

    super.addComponentInstantiationListener(new SpringComponentInjector(this, applicationContext, true));

    forEachListeners(new IListenerCallback() {
        public void handleListener(String beanName, WebApplicationStartupListener listener) {
            listener.startup(OnyxApplication.this);
        }

        public boolean terminateOnException() {
            return true;
        }
    });

    // nice urls
    mount("main", PackageName.forClass(HomePage.class));
    mount("participants", PackageName.forClass(ParticipantSearchPage.class));
    mount("workstation", PackageName.forClass(WorkstationPage.class));
    mount("stage", PackageName.forClass(StagePage.class));
    mount(new QueryStringUrlCodingStrategy("/ws/purge", PurgeWebService.class));
    mount(new QueryStringUrlCodingStrategy("/ws/export", ExportWebService.class));
    // mount("administration", PackageName.forClass(AdministrationPage.class));

    getSecuritySettings().setAuthorizationStrategy(new RoleAuthorizationStrategy(new UserRolesAuthorizer()));
    getSecuritySettings().setUnauthorizedComponentInstantiationListener(this);

    getApplicationSettings().setPageExpiredErrorPage(HomePage.class);
    getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);

    SecurePackageResourceGuard guard = new SecurePackageResourceGuard();
    guard.addPattern("+*.*");
    getResourceSettings().setPackageResourceGuard(guard);

    // Set default timeout
    getRequestCycleSettings().setTimeout(Duration.ONE_HOUR);

    log.info("Onyx Web Application [{}] v{} has started", getServletContext().getContextPath(),
            this.getVersion());
}

From source file:sf.wicketlearningapplication.WicketLearningApplication.java

License:Creative Commons License

@Override
protected void init() {
    super.init();

    addComponentInstantiationListener(new SpringComponentInjector(this));

    mount("/wicketlearningapplication", PackageName.forClass(HomePage.class));
    mountBookmarkablePage("/wicketlearningapplication/SignInPage", SignInPage.class);
}