/** * @see org.apache.wicket.IPageMap#attributeForId(int) */ public final String attributeForId(final int id) { return attributePrefix() + id; }
/** * @see org.apache.wicket.IPageMap#nextId() */ public final int nextId() { dirty(); return pageId++; }
/** * Returns the pageMap. * * @return pageMap */ public final IPageMap getPageMap() { return PageMap.forName(pageMapName); }
/** * Removes all pages from this map */ @Override public void clear() { super.clear(); // Clear access stack accessStack.clear(); dirty(); }
public void entry(IPageMapEntry entry) { removeEntry(entry); } });
/** * Redirects browser to an intermediate page such as a sign-in page. The current request's URL * is saved exactly as it was requested for future use by continueToOriginalDestination(); Only * use this method when you plan to continue to the current URL at some later time; otherwise * just use setResponsePage or, when you are in a constructor, redirectTo. * * @param pageClazz * The page clazz to temporarily redirect to */ public final <T extends Page> void redirectToInterceptPage(final Class<T> pageClazz) { final RequestCycle cycle = RequestCycle.get(); setUpRedirect(cycle); cycle.setResponsePage(pageClazz); }
/** * @see org.apache.wicket.IPageMap#getEntry(int) */ public final IPageMapEntry getEntry(final int id) { return (IPageMapEntry)Session.get().getAttribute(attributeForId(id)); }
/** * @see org.apache.wicket.IPageMap#clear() */ public void clear() { // Remove all entries visitEntries(new IVisitor() { public void entry(IPageMapEntry entry) { removeEntry(entry); } }); }
/** * @see org.apache.wicket.IPageMap#getSizeInBytes() */ public final long getSizeInBytes() { long size = Objects.sizeof(this); Iterator<IPageMapEntry> it = getEntries().iterator(); while (it.hasNext()) { IPageMapEntry entry = it.next(); if (entry instanceof Page) { size += ((Page)entry).getSizeInBytes(); } else { size += Objects.sizeof(entry); } } return size; }
/** * @see org.apache.wicket.IPageMap#remove() */ public final void remove() { // First clear all pages from the session for this pagemap clear(); // Then remove the pagemap itself Session.get().removePageMap(this); }
public void entry(IPageMapEntry entry) { removeEntry(entry); } });
/** * Redirects browser to an intermediate page such as a sign-in page. The current request's URL * is saved exactly as it was requested for future use by continueToOriginalDestination(); Only * use this method when you plan to continue to the current URL at some later time; otherwise * just use setResponsePage or, when you are in a constructor, redirectTo. * * @param page * The page to temporarily redirect to */ public final void redirectToInterceptPage(final Page page) { final RequestCycle cycle = RequestCycle.get(); setUpRedirect(cycle); cycle.setResponsePage(page); }
/** * @see org.apache.wicket.IPageMap#getEntry(int) */ public final IPageMapEntry getEntry(final int id) { return (IPageMapEntry)Session.get().getAttribute(attributeForId(id)); }
/** * @see org.apache.wicket.IPageMap#clear() */ public void clear() { // Remove all entries visitEntries(new IVisitor() { public void entry(IPageMapEntry entry) { removeEntry(entry); } }); }
/** * @see org.apache.wicket.IPageMap#getSizeInBytes() */ public final long getSizeInBytes() { long size = Objects.sizeof(this); Iterator it = getEntries().iterator(); while (it.hasNext()) { IPageMapEntry entry = (IPageMapEntry)it.next(); if (entry instanceof Page) { size += ((Page)entry).getSizeInBytes(); } else { size += Objects.sizeof(entry); } } return size; }
/** * Returns the pageMap. * * @return pageMap */ public final IPageMap getPageMap() { return PageMap.forName(pageMapName); }
/** * @see org.apache.wicket.IPageMap#remove() */ public final void remove() { // First remove the pagemap itself Session.get().removePageMap(this); // Then clear all pages from the session for this pagemap clear(); }
/** * @see org.apache.wicket.IPageMap#attributeForId(int) */ public final String attributeForId(final int id) { return attributePrefix() + id; }
/** * @see org.apache.wicket.IPageMap#nextId() */ public final int nextId() { dirty(); return pageId++; }
/** * @see org.apache.wicket.IPageMap#remove(org.apache.wicket.Page) */ public final void remove(final Page page) { // Remove the pagemap entry from session removeEntry(page.getPageMapEntry()); // Make sure it doesn't get added again at the end of the request cycle Session.get().untouch(page); }