List of usage examples for org.apache.wicket Application getHomePage
public abstract Class<? extends Page> getHomePage();
From source file:jp.xet.uncommons.wicket.fixedurl.FixedUrlHomePageMapper.java
License:Apache License
/** * TODO for daisuke//from www .java2 s .c om * * @param application {@link Application} * @throws NullPointerException ?{@code null}??? * @since 1.2 */ public static void replaceHomePageMapper(final Application application) { Args.notNull(application, "application"); ICompoundRequestMapper mappers = application.getRootRequestMapperAsCompound(); IRequestMapper homePageMapper = null; for (IRequestMapper mapper : mappers) { if (mapper instanceof HomePageMapper) { homePageMapper = mapper; break; } } if (homePageMapper != null) { mappers.remove(homePageMapper); } mappers.add(new FixedUrlHomePageMapper(new ClassProvider<Page>(null) { @Override public Class<Page> get() { @SuppressWarnings("unchecked") Class<Page> homePage = (Class<Page>) application.getHomePage(); return homePage; } })); }