Changeset 4988


Ignore:
Timestamp:
04/16/14 09:48:43 (10 years ago)
Author:
Twan Goosen
Message:

mounted about page (and refactoring into methods of init in application class)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/VloWicketApplication.java

    r4928 r4988  
    44import eu.clarin.cmdi.vlo.service.XmlTransformationService;
    55import eu.clarin.cmdi.vlo.service.solr.SolrDocumentService;
     6import eu.clarin.cmdi.vlo.wicket.pages.AboutPage;
    67import eu.clarin.cmdi.vlo.wicket.pages.AllFacetValuesPage;
    78import eu.clarin.cmdi.vlo.wicket.pages.FacetedSearchPage;
     
    5556    public void init() {
    5657        super.init();
     58
     59        // register global resource bundles (from .properties files)
     60        registerResourceBundles();
     61
     62        // mount pages on URL paths
     63        mountPages();
     64
     65        // configure Wicket cache according to parameters set in VloConfig
     66        setupCache();
     67    }
     68
     69    private void registerResourceBundles() {
    5770        // this listener will inject any spring beans that need to be autowired
    5871        getComponentInstantiationListeners().add(new SpringComponentInjector(this, applicationContext));
     
    6376        // register the resource of application properties (version information filtered at build time)
    6477        getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("application"));
     78    }
    6579
     80    private void mountPages() {
    6681        // Faceted search page (simple search is on root)
    6782        mountPage("/search", FacetedSearchPage.class);
     
    7388        // because it's a filter on the facet list)
    7489        mountPage("/values/${" + AllFacetValuesPage.SELECTED_FACET_PARAM + "}", AllFacetValuesPage.class);
     90        // About page
     91        mountPage("/about", AboutPage.class);
     92    }
    7593
     94    private void setupCache() {
    7695        // configure cache by applying the vlo configuration settings to it
    7796        final int pagesInApplicationCache = vloConfig.getPagesInApplicationCache();
Note: See TracChangeset for help on using the changeset viewer.