/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. * * Returns the page with given id and versionNumber. It keeps asking pageMaps for given page * until it finds one that contains it. * * @param pageId * @param versionNumber * @return The page of that pageid and version, null if not found */ public final Page getPage(final int pageId, final int versionNumber) { if (Application.get().getSessionSettings().isPageIdUniquePerSession() == false) { throw new IllegalStateException( "To call this method ISessionSettings.setPageIdUniquePerSession must be set to true"); } List pageMaps = getPageMaps(); for (Iterator i = pageMaps.iterator(); i.hasNext();) { IPageMap pm = (IPageMap)i.next(); if (pm.containsPage(pageId, versionNumber)) { return getPage(pm.getName(), "" + pageId, versionNumber); } } return null; }
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. * * Returns the page with given id and versionNumber. It keeps asking pageMaps for given page * until it finds one that contains it. * * @param pageId * @param versionNumber * @return The page of that pageid and version, null if not found */ public final Page getPage(final int pageId, final int versionNumber) { if (Application.get().getSessionSettings().isPageIdUniquePerSession() == false) { throw new IllegalStateException( "To call this method ISessionSettings.setPageIdUniquePerSession must be set to true"); } List<IPageMap> pageMaps = getPageMaps(); for (IPageMap pageMap : pageMaps) { if (pageMap.containsPage(pageId, versionNumber)) { return getPage(pageMap.getName(), "" + pageId, versionNumber); } } return null; }