/** * @param pageMap * Sets this page into the page map with the given name. If the page map does not yet * exist, it is automatically created. */ final void setPageMap(final IPageMap pageMap) { // Save transient reference to pagemap this.pageMap = pageMap; // Save name for restoring transient pageMapName = pageMap.getName(); }
/** * @param map * The page map to add to dirty objects list */ void dirtyPageMap(final IPageMap map) { if (!map.isDefault()) { synchronized (usedPageMaps) { usedPageMaps.remove(map); usedPageMaps.addLast(map); } } List dirtyObjects = getDirtyObjectsList(); if (!dirtyObjects.contains(map)) { dirtyObjects.add(map); } }
@Override public void onDetach(WebPage aPage) { aPage.getPageMap().remove(aPage); }
page.getPageMap().put(page); attribute = page.getPageMap().attributeForId(page.getNumericId()); if (getAttribute(attribute) == null) attribute = attributeForPageMapName(((IPageMap)object).getName());
/** * 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; }
add(new Label("name", pageMap.getName() == null ? "null" : pageMap.getName())); add(new Label("size", "" + Bytes.bytes(pageMap.getSizeInBytes())));
IPageMapEntry entry = pageMap.getEntry(access.getId()); PageParameters parameters = new PageParameters(); parameters.put("pageId", "" + entry.getNumericId()); parameters.put("pageMap", pageMap.getName() == null ? "" : pageMap.getName()); Link<?> link = new BookmarkablePageLink<Void>("link", InspectorPage.class, parameters); link.add(new Label("id", "" + entry.getNumericId()));
/** * Redirects to any intercept page previously specified by a call to redirectToInterceptPage. * * @return True if an original destination was redirected to * @see Component#redirectToInterceptPage(Page) */ public final boolean continueToOriginalDestination() { return getPage().getPageMap().continueToOriginalDestination(); }
public void pageMap(IPageMap pageMap) { pageMap.clear(); } });
/** * @return Size of this session, including all the pagemaps it contains */ public final long getSizeInBytes() { long size = Objects.sizeof(this); for (final Iterator iterator = getPageMaps().iterator(); iterator.hasNext();) { final IPageMap pageMap = (IPageMap)iterator.next(); size += pageMap.getSizeInBytes(); } return size; }
final IPageMapEntry oldestEntry = pageMap.getEntry(oldestAccess.getId());
pageMapsUsedInRequest.put(pageMap, newEntry); final String id = Strings.firstPathComponent(path, Component.PATH_SEPARATOR); Page page = pageMap.get(Integer.parseInt(id), versionNumber); if (page == null)
page.getPageMap().put(page); attribute = page.getPageMap().attributeForId(page.getNumericId()); if (getAttribute(attribute) == null) attribute = attributeForPageMapName(((IPageMap)object).getName());
/** * 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; }
/** * Redirects to any intercept page previously specified by a call to redirectToInterceptPage. * * @return True if an original destination was redirected to * @see Component#redirectToInterceptPage(Page) */ public final boolean continueToOriginalDestination() { return getPage().getPageMap().continueToOriginalDestination(); }
public void pageMap(IPageMap pageMap) { pageMap.clear(); } });
/** * @return Size of this session, including all the pagemaps it contains */ public final long getSizeInBytes() { long size = Objects.sizeof(this); for (IPageMap pageMap : getPageMaps()) { size += pageMap.getSizeInBytes(); } return size; }
final IPageMapEntry oldestEntry = pageMap.getEntry(oldestAccess.getId());